macros
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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?

resolvedResolved · Low Priority · Version 2010

replyReply Wed 16 Nov 2011, 16:48Delegate Steven said...

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?

For upcoming training course dates see: Pricing & availability

replyReply Fri 18 Nov 2011, 14:02Trainer Simon said...

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.

 

Please browse our web site to find out more about
excel vba course london and other Microsoft training courses.

Excel tip:

Use the SUBTOTAL function in Excel

You can create subtotals in your spreadsheet using the SUBTOTAL function, which looks like this:

=SUBTOTAL(9,cell:cell)

9 represents the function being used (SUM), followed by the range of cells the function is operating on.

The neat thing about using the Subtotal function is that if you have used it several times in the same column or row, clicking on the AutoSum button at the end of the column or row will make Excel add only the results of cells containing the Subtotal function in that column or row.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard