Nothing has changed but macros won't work!?!

  • Thread starter Thread starter JFamilo
  • Start date Start date
J

JFamilo

I have written a few macros and sent them via a text file to a
colleague. She has used these macros on several of her files by
copying and pasting them into new modules. Once the macros are
operable for that workbook we send them on to other users, that way
they just need to click a button and it works.

This process has always worked well. But recently when she tries to
run the Macro there is always an error. It has something to do with
adding a button to a worksheet. It worked earlier and the code has NOT
changed. This has happened on several occasions. Is there something
unstable about macros that can be changed so they will always run
without fail!?

Thanks in advance.
 
In an update to this....after working on this for a long time and
restarting Excel, restarting the computer, retyping some code etc. we
finally figured out the problem.

If you are assigning a button to a macro in a file, for example:
Set btn = ActiveSheet.Buttons.Add(l, T, H, W)
btn.OnAction = "Tennessee Policies Aug-2004!macro2"

Make sure the filename doesn't have a "-" in it! That turned out to be
our problem


Hopefully I can save someone a lot of time with this.
 

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