Macros stopped working

  • Thread starter Thread starter dav135
  • Start date Start date
D

dav135

I have an excel spreadsheet named 'CountyStats.xls' which has various
macros within. Up until a couple of days ago everything worked fine,
however now when i try to click a button to run a macro i get a
message saying 'The macro 'CountyStats.xls!G8' cannot be found. This
macro is saved in a module as:

Sub G8()
GameNo = 8
Call MatchDetails
End Sub

which calls the MatchDetails sub (which is a public sub) in another
module.

If i try to re-assign the button to the macro, I select the sub and
click ok but this gives me a message saying 'Reference must be to a
macro sheet'

What is confusing me too, is that on another sheet I have a button
which linkes to sub G7 (exactly the same as G8 but GameNo = 7), and
this works fine.

Any help would be much appreciated. Thanks
 
Just something to try...

I have had a similar error when I mistakenly copied a sub, but forgot to
change the name...do a search across all modules for "G8" and see if there is
more than one "G8" sub.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top