Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

macros

Forum home » Delegate support and help forum » Microsoft Excel Training and help » How do I fix my Excel macro?

How do I fix my Excel macro?

ResolvedVersion 2010

Steven has attended:
Excel Advanced course

How do I fix my Excel macro?

What would be the typical procedure to follow if a Macro I ran wasn't working, and noone in the office was able to fix it?

RE: Macros

Hi Steven,

Thank you for your question and welcome to the forum.

When you record a macro in the front end of Excel to automate a process, the VBA application is recording each instruction you give it as a separate line of code in a procedure in a module.

If a macro is not working you will probably get an error box possibly displaying a runtime error number. If you click debug it will take you into the VBA window and display the code that was written when you recorded the macro. It will generally highlight the offending code in yellow which will need to be edited and changed.

To change the macro you have to edit the code or repeat recording the macro in the front end until you get it right.

If you want to view the VBA code then use ALT + F11. Alternatively, if you get an error number then google that error number e.g. vba error number 1004.

I hope this helps.

Regards

Simon

Thu 24 Nov 2011: Automatically marked as resolved.

Excel tip:

Create a hyperlink navigation sheet

In large files, it is often useful to have a front sheet with hyperlinks to the key databases and summary calculations in your spreadsheet. Hyperlinks can save you and (more importantly) those less familiar with your spreadsheet a great deal of pointless scrolling between and within sheets.



Hyperlinks appear as underlined text and can jump to any cell or range name in your file. You can also use hyperlinks to jump to other files.



To create a hyperlink to a location in the active workbook: (1) Select the cell that contains the text you want to use as the hyperlink and choose Insert|Hyperlink.(2)Click Place in this document.(3)Choose the sheet you want to link to or the range name from the list of "Defined Names".(4)If necessary, type the cell reference in the Type in the cell reference box. (5) Click OK.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.