VB code to insert/get data

Hi where can I find information and examples about inserting data to 
databse and getting from DB to excell ?
As far I know I need to use VBA code ?

hokah (84)
3/13/2005 2:00:43 PM
excel 39879 articles. 2 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 27

Hi Peter

you can also query a database via data / get external data / new database 
query option ... and use MS Query to set criteria etc - unfortunately i'm 
not aware of any websites that have a write up on this.


"Piotr" <hokah@wp.pl> wrote in message news:d11h2e$ohe$1@inews.gazeta.pl...
> Hi where can I find information and examples about inserting data to 
> databse and getting from DB to excell ?
> As far I know I need to use VBA code ?
> regards
> Peter 

JulieD1 (2295)
3/13/2005 3:24:34 PM
I would rather use coding to let user change for example month period 
etc. as I want them to connect to DB from outside of the local network 
it would be better to querry just a minimal portion of data instead of 
filtering through a querry.

U´┐Żytkownik JulieD napisa´┐Ż:
> Hi Peter
> you can also query a database via data / get external data / new database 
> query option ... and use MS Query to set criteria etc - unfortunately i'm 
> not aware of any websites that have a write up on this.
> Cheers
> JulieD
> "Piotr" <hokah@wp.pl> wrote in message news:d11h2e$ohe$1@inews.gazeta.pl...
>>Hi where can I find information and examples about inserting data to 
>>databse and getting from DB to excell ?
>>As far I know I need to use VBA code ?
hokah (84)
3/13/2005 4:42:10 PM

Similar Artilces:

Not getting CD notifications in service
Hello we are handling WM_DEVICECHANGE message for the CD events. in handler function we check for event type -- if event is DBT_DEVICEARRIVAL - ie CD inserted. if event is DBT_DEVICEREMOVECOMPLETE ie CD removed. this is working fine when we run it as a desktop application. but when we add the same in a service we are not getting WM_DEVICECHANGE message for CD events. Any help would be appreciated. Regards Karbhari I believe this is correct, because the GUI for the service is runn...

Can't get web image to set as desktop background
Hi folks: I am running windows XP and using IE8. When I come across any image on the web that I want to use as my desktop background, I can't do it. I right-click on the image, select set as desktop background and then get a warning message that access is denied. I am logged in as the administrator and am the only user on the computer. My IE8 security settings are set to medium. I can change my background image from the any graphic file already saved on my hard drive or from the desktop tab in the display properties window. I just can't use the right click functi...

Mutual fund codes
I have a mutual fund that I cannot get the prices for. The code is CA:AIM3593 and Money does not list that fund. I'm upgrading from Quicken 2002, which could download prices for this fund and I'm deciding between the latest versions of Money and Quicken. There are 7 other funds that I cannot get prices for because Money does not list the fund. The codes are all available at https://www.cannex.com/canada/english/fund/fp030ae.html and all work with Quicken. -- If you can keep your head about you, while all those around you are losing theirs, you just don't understand the...

VB distmon?
Hi I have recently installed Office 2003. A couple of wired things happen in Excel: > Everytime I close the program I get a MS VB error that reads "Compile error in hidden module: Distmon" Every time open the program I get the same error, but the macro it is calling is "autoexecnew" > Since my new installation, I type in an simple function like TRIM and it tells me cannot find project library. any ideas? Thnaks! Alan Alan http://support.microsoft.com/default.aspx?scid=kb;EN-US;q307410 OFF: "Compile Error in Hidden Module" Error Message When You Sta...

How to get Office Publisher 2003 to convert .pub to .pdf file ???
How to configure Acrobat Distiller to work with Publisher 2007 and with Publisher 2003 http://support.microsoft.com/default.aspx?scid=kb;en-us;826360 Tried to work with recommendations at above 826360 website, but still cannot convert Publisher file to a pdf. Am using Office2003 (Publisher) and Adobe Acrobat 5.0 (AA5). When try to print to a file with Acrobat Distiller it does not offer the ..pdf extension option, and when I manually add the extension onto the file name it will save the file but AA5 will not load the file. Think I have closely followed the 826360 'How to...' instr...

Which type of digital certificate to get from VeriSign for SignedXML
Hi all, Happy New Year. I am using SignedXML and an X509 certificate to digitally sign a SOAP message body and put the signature in the SOAP header for a B2B business application. Can you suggest which type of digital certificates from VeriSign is for this purpose? I checked VeriSign's web site but didn't find it obvious to decide. Thank you very much for your help. --- Guangxi Hi Guangxi, What about the Secure Site Services? SSL certificates are ideal for securing Web sites, intranets and extranets. It's cheap and guarantee every SSL session will receive powerful SSL enc...

Duplicate detection (looking for code)
I would like to add code to detect for duplicates or records with similar information. Looking to do this check on (firstname and lastname) and on address (street1, street2, city, state, zip) But I want something a little more advanced than just checking for exact matches. Wondering if anyone has some code they would care to share that might make my job of writing it a little easier? Example: Bob Smith and Bobby Smith would be detected as duplicates Rob Jones and Robert Jones would be detected as duplicates 123 main street pittsburgh, pa 15126 123 main st pittsburgh pa 15...

Bar code scanners
Hello All! I have a warehouse facility and several stores and am trying to find a way to use a barcode scanner with internal memory to scan large orders (200 pieces or greater) that i can then hook to my pc with RMS and "dump" the information into either a transfer out or an invoice. has anyone done this? if not does anyone have any recommendations? is there a person i could contact that may be able to write a short program or executable to make this happen? I would appreciate any and all information anyone may be able to provide. Thanks, Jim Hi Jim, I don't kno...

Help my family get out of debt
Sometimes life can be rough and unforgiving. The debt I acquired, over the years, began with simply signing a year lease with a co-worker. I was new to the town, he seemed like an honest guy, so I believed it would be a good idea....Wrong. Within less than 3 months he descided to not pay his half of the rent, as agreed upon, and skip off to California leaving me with rent that was 2 times what I made. Eventually, I was evicted, and now I have a $15,000 ding on my credit report. Couple that with a new child and the costs that are accrued with a birth, and you're looking at a seemingly h...

Colorising cells from code
I am using the code below which runs whenever a cell is edited -I think. I would like to change this code so that it can be 'run' against a range of cells rather than as Worksheet_Change code. What do I need to do to do that ? Thanks Sub Worksheet_Change(ByVal Target As Range) Dim icolor As Integer If Range("A1").Value = "" Then If Not Intersect(Target, Range("B4:J34, B35:B39")) Is Nothing Then Select Case Target Case Sheet3.Range("A4") icolor = 34 Case Sheet3.Range("A5") icolo...

EAN 14, Dun 14
Hi, I have a printer TLP 2844 (Zebra) and I need to print bar codes using EAN 14 or Dun 14. Anyone have any idea how I can do that? I want just a simple sample in how do that. I posted this question here in excel forum because there isn't any group related as bar codes and because I want to work with that using just Excel. Thanks in advance, Magno magno_jr@terra.com.br You will need to buy a software designed for barcode like Lableview. EAN14 is not a common barcode so make sure it will do that. If you call Zebra, I think they sell something, if not they can recommand on...

Code does not work on merged cells
The following code works fine on single cells but I also have Dat Validation which for cosmetic purposes merges to the next cell e.g Cell B3 merges into cell C3 - why, if I use either B3 or B3:C3 in th code below does it not work? i.e. I should get an error message if try to delete data from one of the cells. Thanks _Code_ Application.EnableEvents = False If (Len(Range("b10")) = 0) Or (Len(Range("c10")) = 0) O (Len(Range("f10")) = 0) Then With Target If .Value = "" Then Application.EnableEvents = False .Value = "Invalid" MsgBox "You ...

Excel VB
I have two cells in a workbook that are dates. The cell Start_Date has a valid date in it. The second cell Test_Date is either blank or has a valid date in it. The IsDate test on both cells works fine, however, on a blank cell the Month function extracts "12". Anyone know why? I had to put the month function within a test for IsDate to make it work. Seems like Month function on a blank cell should return something other than a 12. Dave Test code: If IsDate(Range("Start_Date")) Then 'Cell has 11/01/09 in it. MsgBox ("start date a d...

Email Template not getting Updated.
When I tried to edit and save "Title" field of Email Template it throws error with message :"Server was unable to process request." ,"Unexpected type for the property". Is there a way to edit and save this field? ...

Cannot Add any window to VB
Hello: I'm using a VM with GP 10.0 SP3 installed. In order to have the same as our production databases i copy the GP folder, entirely, which i think it was a mistake now I'm getting a "This cannot be added to Visual Basic", whenever i try to add a window, any window, to VB. Also it goes without saying that there's a lot of load errors starting GP. For the record the copy/paste thing worked, sort of, and before you start thinking that i was insane to have done this, there's a reason behind it, There's been a lot of tweaks to our production server, by our p...

getting the window handle at start up
I tried to get the window handle for DirectShow and Direct3D at start up of the application. I got a runtime error whichever way I tried. I tried from the main frame's constructor. I tried from the view's constructor. And I tried from the application's InitInstance function. None worked. My guesses are either I'm not doing it with a thread safe approach, or the window handle is not yet created when I try to use it. So where and how can I safely grab the window handle for use? wanwan wrote: > I tried to get the window handle for DirectShow and Direct3D at start > up o...

Expression with wrong data type message box
I have a form with 2 email addresses in it, the To email addy and the CC email addy. When one of our employees clicks the button to send a report from the form in an email, he gets this message box: "An expression you entered is the wrong data type for one of your arguements" I can't duplicate his problem, but he's still having it. Thank you in advance for any help. Gee Check to see if they have any MISSING references. And, just in case you aren't sure how: http://www.btabdevelopment.com/main/QuickTutorials/Howtocheckformissingreferences/tabid/71/Default.aspx -- ...

how to get rid of errors? #2
Thanks for the input, but actually I was more concerned about gettin rid of all error messages when the file loads up. It looks like yo gave me a cool utility, but I am not too concerned about fixing th links. Is there a way to ignore all messages that pop up when i load my exce sheet? regardless of what it is? Thank -- Jon ----------------------------------------------------------------------- Jonx's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1317 View this thread: http://www.excelforum.com/showthread.php?threadid=26148 Think deleting all the "pha...

i want to insert a check mark box in publisher
I WOULD LIKE TO INSERT A CHECK MARK BOX ON MY DOCUMENT IN PUBLISHER, HOW DO I DO THIS? THANKS ROSY rosygucci wrote: > I WOULD LIKE TO INSERT A CHECK MARK BOX ON MY DOCUMENT IN PUBLISHER, HOW DO I > DO THIS? THANKS ROSY a) Please do not post in ALL CAPS. It is the internet equivalent of hollering at the top of your voice, and is more difficult to understand than sentence case and is rude. b) Use the Wingdings font, and type a 'q'. -- Ed Bennett - MVP Microsoft Publisher http://ed.mvps.org ...

vb from VC++
Hi, is it possible, and if so, to call a Vb macro from VC++. Or manipulate spreadsheets (ie draw graphs from the data within the workbooks) usinbg MFC functions cheers Anthony Presumably you are referring to MS Excel spreadsheets and workbooks. The easiest method would be to import the appropriate type library (.tlb) provided with Excel, having the class wizard generate the classes, which you then use to access the Excel Automation model (that is the same model that Excel VBA uses). Some investigation may be needed to determine which tlb to use, and to make sure you have a basic understand...

Inserting A Blank Line?
The following data is imported to a worksheet using a macro. Is it possible to insert a blank line between each header? The amount of data varies between headers and total. 1:40Folkestone 9 Apr 2009 Maiden (Class 6) 5f 14 Run ANJOMARBA OUR GEORGIE GIRL RUFUS ROUGHCUT DIAMOND AFFAIR SAACHIS VISION DIAMOND LAURA 1:50Wincanton 9 Apr 2009 Novice Handicap Hurdle (Class 4) 2m 18 Run QUINY BOY TENOR DE BALME GRAND ARTICLE WESTSTERN STAR TENOR JOCHESKI WUJOOD GAINSBOROUGHS ART HIGH CAROL LEPIDO BID ART RUBY VALENTINE NESOTHO 2:10Folkestone 9 Apr 2009 Handicap (Class 5) 6f 12 Run RARE ART SHADOW B...

How to show data between two dates?
I have a list of tenants and the dates they moved in and out of their flats. I need to show which weeks within a specific period that the flats were filled - either by showing the tenants intials or a tick. A B C D E F G H Unit No Client Start End 04-01 11-01 18-01 25-01 1 JB 23-11 06-02 JB 2 GK 05-01 GK GK GK GK 3 LB 01-12 28-02 LB LB LB LB Does anybody know how is best to do this? We've tried using an IF formula but it doesn't work if their is a start and end date. ...

Auto assigning department Codes to a Project
We have many projects set up - within each project we assign multiple resources. The resources are often from different departments. Today, we set up a project for each department as we cannot seem to make PA "dynamically" assign our department value based upon the person assigned to the project. Is it possible to have a project dynamicaly assign a department code (a GL segment) based upon the person assigned to the project? -- Dave Not without customization using VBA or Dexterity. -- Charles Allen, MVP "David Schmidtknecht" wrote: > We have many project...

VB in Excel
In Excel I go into Visual Basic Editor, then Visual Basic Help, but when I type 'Passwords' for example it will bring up a list of related items, but some of them you can't select. Does this mean the installation CD is corrupt and hasn't installed all the components? I have reinstalled and repaired the installtion but to no avail. Any ideas anyone? Help! Thanks ...

Get the following error 'Publisher Unable to open File' in MS Pub
I'm currently working on this months magazine for my local sports association. I have saved the file shut down my PC restared and troed to open the file when i attempt this i get the following error message. Publisher unable to open file.. Can anyone help or know what is stopping me from opening this file i succesfully open other publisher files but cannot open this months edition.. I dont really fancy starting from stratch! -- Matt Owner MSE IT www.mse-it.co.uk Which version of Publisher are you using? You are welcome to send it to me and I'll see if I can open it. -- Jo...