+ Reply to Thread
Results 1 to 2 of 2

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

  1. #1
    Registered User
    Join Date
    12-08-2004
    Posts
    31

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

    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.

  2. #2
    Registered User
    Join Date
    12-08-2004
    Posts
    31

    Update

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1