Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Refresh from Access not working

I have an excel spreadsheet (called "2009info") that is linked to an Access
database. Even though the connection properties specify that this should
refresh the data upon opening, it does not refresh unless I manually select
the refresh button.

I have a macro that I'm using to do various things with this spreadsheet and
several others so I used the following command in the macro to avoid having
to manually refresh it upon opening:

ActiveWorkbook.RefreshAll

This command works fine if I step through the macro but it does not work
when I generate the macro by simply running it. I don't get an error but it
does not do the refresh. Does anyone know why this would be happening and
what I can do to get around it?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Refresh from Access not working

hi
try this instead....
Private Sub Workbook_Open()
Sheets("2009info").Range("A1").QueryTable.Refresh _
BackgroundQuery:=False
End Sub

regards
FSt1

"klav" wrote:

I have an excel spreadsheet (called "2009info") that is linked to an Access
database. Even though the connection properties specify that this should
refresh the data upon opening, it does not refresh unless I manually select
the refresh button.

I have a macro that I'm using to do various things with this spreadsheet and
several others so I used the following command in the macro to avoid having
to manually refresh it upon opening:

ActiveWorkbook.RefreshAll

This command works fine if I step through the macro but it does not work
when I generate the macro by simply running it. I don't get an error but it
does not do the refresh. Does anyone know why this would be happening and
what I can do to get around it?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Refresh from Access klav[_2_] Excel Programming 0 February 13th 09 07:34 PM
Auto Refresh of Pivot Tables not working meo Excel Worksheet Functions 0 March 13th 08 05:31 PM
Background refresh not working GorKo Excel Programming 1 July 25th 07 06:00 AM
External Data Refresh not working Mike B in VT Excel Discussion (Misc queries) 0 February 10th 06 06:23 PM
Web Query Logins and Access Refresh [email protected] Excel Programming 3 April 12th 04 10:46 PM


All times are GMT +1. The time now is 04:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"