Macro Not Working But Cannot Find It To Change It!

Outlook

New member
Local time
Today, 21:18
Joined
Jul 15, 2013
Messages
4
Hi All,

Sometime ago I setup an access database for the company I work for.

It has worked fine for approximately 2 years, but recently I made some additions to it.

Now when I click on any button (which are linked to macros) the macro works but gives me an error about a macro that I can't even find.

Error as follows:
1004
Cannot run the macro "Completions". The macro may not be available in this workbook or all macros may be disabled.

Macros are not disabled, and I can't find the "Completions" macro to even change it.

Any ideas welcome as I'm so confused.

Thanks.

Hannah.
 
The error message is saying that Access can't find it - so it's not there to be found.

Do you have an earlier version of the db where it might still exist?

Alternatively could you have changed the name of the macro? or changed the name where it is called?
 
Hi,

I can't find the macro "Completions" even named in this macro though, so why does it look it up?

Private Sub Image59_Click()
Call SendTQ2XLWbSheet("File Progression - Stratford", "Pipeline", "O:\Public\Public-Lettings\Lettings Documents\Rolling Running Lettings Transactions.xls")
End Sub

Thanks.
 
What is in the SendTQ2XLWbSheet function?

One thing you could try to do is debug - I don't use macros, prefer vba - so not sure how you do this for a macro but assuming you can as you step through the code it will error at the right place.

In VBA if you click on the Call line you posted and hit F9 a maroon dot will appear to the left. Then when you run your code it will stop at this line, highlighting in yellow just before executing it. Repeatedly hitting F8 will then step through the code, line by line. Hovering over variables will give you their values
 
The SendTQ2XLWbSheet function means that it takes the result of the "File Progression - Stratford" query, and pastes it to the Excel Worksheet "Pipeline", which can be found "O:\Public\Public-Lettings\Lettings Documents\Rolling Running Lettings Transactions.xls"

I've tried the debug. The maroon colour appears, but no yellow.

Thanks.
 
you need to run the code - i.e. in form view click on the image59 control
 
create a new macro with the name of the one your database is asking for, make it simply display a message box "this is where the macro should be". as long as you don't have your warnings turned off somewhere in the code, you should get the message box when your macro is initiated, and then you can see "when" it's being called and maybe find it. it could be hidden inside a macro inside a VBA inside a VBA...

if it doesn't let you create it, it exists but is possibly hidden. though access should still "find" it so i doubt this is the case. but if it is, right click on the navigation pane and choose "navigation options" and be sure that macros are selected under "object type" and that "show hidden objects" is selected at the bottom left.
 

Users who are viewing this thread

Back
Top Bottom