Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Troubleshoot macros
 

ShowWhen I click the Refresh button, a message tells me that my macro changes will be lost.

This message appears when you have made changes to a macro in the Visual Basic Editor and have also changed the copy of your workbook in the Microsoft Script Editor.

To save the changes to your macro, do the following:

  1. Click No.
  2. Switch to the Visual Basic Editor window.
  3. Export any modules (module: A collection of declarations, statements, and procedures stored together as one named unit. There are two types of modules: standard modules and class modules.) you have changed.
  4. In your workbook in Microsoft Script Editor, click Refresh Button image on the Refresh toolbar.
  5. Click Yes.
  6. Import the modules to restore the changes to your macro.

ShowWhile recording a macro, I recorded an action I didn't want.

To undo an unwanted action in a macro, you can open the macro in the Visual Basic Editor and remove any unwanted steps.

If you don't want to use the Visual Basic Editor, record the macro again without the unwanted action.

ShowA macro I recorded sometimes produces an error message.

A macro you record may not run properly in every situation. If the macro cannot run, Microsoft Excel displays an error message. Some macros depend on certain options or settings in Excel. For example, a macro that searches for bold text won't run properly if bold text isn't displayed. If a macro you've recorded produces an error message, note the error number. You can then search for "error messages" in Visual Basic Help and find information about the message you received.

© 2009 Microsoft Corporation. All rights reserved.