ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA PROBLEM - Running Macros! (https://www.excelbanter.com/excel-programming/303323-vba-problem-running-macros.html)

MrMerton[_2_]

VBA PROBLEM - Running Macros!
 
Hi,

Does anyone know whether I can run a macro LINE BY LINE. I want to
look at a macro that I have written and work out at which point it is
going wrong. IS THERE A TOOL TO RUN THE MACRO BIT BY BIT?

Many thanks for your help! Sorry if this is a daft question - I have
looked in the VBA help and can't find the answer.

Cheers,

Will


---
Message posted from http://www.ExcelForum.com/


Ron de Bruin

VBA PROBLEM - Running Macros!
 
Hi MrMerton

In the VBA editor put your curser in your macro.

F5 run your complete macro
F8 run your macro line by line

--
Regards Ron de Bruin
http://www.rondebruin.nl


"MrMerton " wrote in message ...
Hi,

Does anyone know whether I can run a macro LINE BY LINE. I want to
look at a macro that I have written and work out at which point it is
going wrong. IS THERE A TOOL TO RUN THE MACRO BIT BY BIT?

Many thanks for your help! Sorry if this is a daft question - I have
looked in the VBA help and can't find the answer.

Cheers,

Will


---
Message posted from http://www.ExcelForum.com/




Paulw2k

VBA PROBLEM - Running Macros!
 
I assume you are in the VBE (alt-F11). Make sure your cursor is in the
procedure you wish to test, then use F8 (menu Debugstep into) to do a line
by line run. Also think about using breakpoints (using F9 to set and unset)
to run normally up to a given point.

Regards

Paul



"MrMerton " wrote in message
...
Hi,

Does anyone know whether I can run a macro LINE BY LINE. I want to
look at a macro that I have written and work out at which point it is
going wrong. IS THERE A TOOL TO RUN THE MACRO BIT BY BIT?

Many thanks for your help! Sorry if this is a daft question - I have
looked in the VBA help and can't find the answer.

Cheers,

Will


---
Message posted from http://www.ExcelForum.com/




MrMerton[_4_]

VBA PROBLEM - Running Macros!
 
Thank you so much for this advice. Something so simple has made my lif
so much easier!


Thanks again.

Wil

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 05:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com