Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-18-2011, 11:06 AM
Jhouk5244 Jhouk5244 is offline Run macros between excel and access Windows XP Run macros between excel and access Office 2003
Novice
Run macros between excel and access
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
macros to excel evh Excel Programming 0 07-20-2011 10:12 PM
Run macros between excel and access 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
Run macros between excel and access Should I uses Access or Excel? tinkertron Office 5 03-29-2009 08:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft