View Single Post
 
Old 08-18-2011, 11:06 AM
Jhouk5244 Jhouk5244 is offline Windows XP Office 2003
Novice
 
Join Date: Aug 2011
Posts: 2
Jhouk5244 is on a distinguished road
Default Ok New issue

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
Reply With Quote