Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to Refresh from Access | Excel Programming | |||
Auto Refresh of Pivot Tables not working | Excel Worksheet Functions | |||
Background refresh not working | Excel Programming | |||
External Data Refresh not working | Excel Discussion (Misc queries) | |||
Web Query Logins and Access Refresh | Excel Programming |