Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querytable in Excel

Status
Not open for further replies.

csjoseph

MIS
Jan 2, 2001
247
US
I have a querytable that I'm trying to put on an excel sheet and then format the spreadsheet. But the formatting happens first then the table shows up. My coding goes like this.

Click Display

Call procedure to get data via ODBC
return to Click Display

call procedure to format table.

But everytime the formatting is done before the data is posted to my spreadsheet.

Help me, what am I missing.
 
I'm not a coder, but I sometimes get these anyway. Try one of these:

...Save the document after getting the data?

...Save it, move it into another file that has the formatting code and run that?

It's probably something to do with the way Excel fires the events; obviously something in your code isn't firing an event that you expect to fire? Just some thoughts until one of our resident coders arrives. :)
techsupportgirl@home.com
Brainbench MVP for Microsoft Word
 
Actually it was the background refresh setting. I set it the false and then the procedure must finish before returning execution to the program
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top