![]() |
|
#2
|
|||
|
|||
|
Alright I'm getting close, I now have my database and excell sheet linked but when I run my code I get an error on line 10 where is says Range ("E8"). The error is Run-Time Error "1004" Select method of range class failed.
I have no idea what goes there, I just want to make sure those data tables update. Thanks for the help! Private Sub CommandButton1_Click() Dim obj As New Access.Application obj.OpenCurrentDatabase ("\\Ohhfp01\users\jhouk\My Documents\CDP Documents\Leadership Dashboard\VSG Planning Dashboard\Dashboard Live Database.mdb") obj.DoCmd.RunMacro "Dashboard Update" obj.CloseCurrentDatabase Set obj = Nothing ActiveWorkbook.Worksheets("LMR DATA").Select Range("E8").Select Selection.QueryTable.Refresh BackgroundQuery:=False End Sub |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| macros to excel | evh | Excel Programming | 0 | 07-20-2011 10:12 PM |
Access or Excel?
|
hektisk | Office | 11 | 04-11-2011 04:24 PM |
| Oulook Deletes Emails Attached with Excel Files That Have Macros | Slacker | Outlook | 4 | 01-24-2011 03:17 PM |
| Excel 2003 SP3 bug when running Macros | EnricoVenturi | Excel | 0 | 09-06-2009 08:11 AM |
Should I uses Access or Excel?
|
tinkertron | Office | 5 | 03-29-2009 08:30 PM |