![]() |
#2
|
||||
|
||||
![]()
For starters it looks like the connection string is not right as the DBName appears to run into the UID without a separator.
Let Connect = "driver={sql server};server=SERVERNAME;Database=DBNAME;UID=USRI D;PWD=PASSWOOD;" Have you actually stepped through the code to see what values are being returned as you go. We don't know anything about the Stored Procedure so have no idea on what the Cmd1 command is doing. I would note that it appears you are creating a loop to replace the text in a bookmark. The way it is written I would expect the bookmark to disappear on the first write but if it didn't then your code would continue writing there without pause so the resulting code if run to completion would just show the last entry.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
stanley | Word | 4 | 12-15-2020 10:59 AM |
![]() |
Erickd90 | Excel | 7 | 07-28-2016 12:20 PM |
![]() |
nfsmith | Excel | 8 | 03-23-2016 11:28 PM |
Excel VBA: Pull data from web | tinfanide | Excel Programming | 0 | 12-09-2011 02:11 AM |
![]() |
psrs0810 | Excel | 2 | 10-25-2010 01:49 PM |