Macro won't run unless editor is open

bravura

Board Regular
Joined
Jan 27, 2010
Messages
51
Hope this is a quick fix?
on my form i have several buttons with event procedures that call a macro. they won't run unless i have the editor open - it just has to be open - and when it's open i can run macros perfectly fine from the form.


Capture.JPG
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
In the property sheet with the form (?) open in design view, click on the ellipses for the button click event and see if it takes you to the correct procedure. By "macro" I'm assuming you're referring to a written procedure and not an actual macro. Since this is an Access question, macros are not the same thing in Access as they are in Excel.
The message is saying that there's no connection between what you have in the property sheet and any event, or there is an issue with the code in the event. In my mind and based on that, it shouldn't work whether or not the editor is open.
 
Upvote 0
VBA Code:
Private Sub cmdHOReport_Click()

    Call ReportsExternal.Reports(0)

End Sub


Private Sub cmdTLReport_Click()

    Call ReportsExternal.Reports(1)

End Sub


Private Sub cmdTSReport_Click()

    Call ReportsExternal.Reports(3)

End Sub


et cetera.

Capture.JPG
 
Upvote 0
I fixed it. this problem happened before and i managed to fix it and i remember what happened. afterr deleting some tables, i had some queries that depended on them. i deleted the queries and it runs fine now.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top