ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run only part of a macro for testing (https://www.excelbanter.com/excel-programming/329735-run-only-part-macro-testing.html)

Josh O.

Run only part of a macro for testing
 
Is it possible to run only a portion of a macro?

I am writing a long involved macro and I need to test each section to make
sure it is producing the desired result before I write the next section of
the macro. I was hoping I could run Section 1, write section 2, run section
2 only, write section 3, run section 3 only...

How can I do that?

AA2e72E

Run only part of a macro for testing
 
Press F9 on the first line of the macro, hen run it: it will stop on that
line. Press F8 to jump through the lines. If you hover the mouse pointer over
any variable names above the cursor line, the values of those variables are
shown as tooltips. Alternatively, query the variables in the Immediate
Window. If you want to jump n lines below, click on the line you want to go
to, click Debug, Select Set Next Statement and Press F5. If you want to stop
altogether, click the reset icon on the standard toolbar.

"Josh O." wrote:

Is it possible to run only a portion of a macro?

I am writing a long involved macro and I need to test each section to make
sure it is producing the desired result before I write the next section of
the macro. I was hoping I could run Section 1, write section 2, run section
2 only, write section 3, run section 3 only...

How can I do that?


arno

Run only part of a macro for testing
 
Hi Josh,

Is it possible to run only a portion of a macro?


in the VBA Editor you'll find everything you need in menu "debug". (F8,
F9, CTRL+F9.... F5)

arno


Don Guillett[_4_]

Run only part of a macro for testing
 
sub mac1
end sub
sub mac2
end sub
sub runall
mac1
mac2
end sub
--
Don Guillett
SalesAid Software

"Josh O." wrote in message
...
Is it possible to run only a portion of a macro?

I am writing a long involved macro and I need to test each section to make
sure it is producing the desired result before I write the next section of
the macro. I was hoping I could run Section 1, write section 2, run

section
2 only, write section 3, run section 3 only...

How can I do that?




Josh O.

Run only part of a macro for testing
 
Thanks Don.

"Don Guillett" wrote:

sub mac1
end sub
sub mac2
end sub
sub runall
mac1
mac2
end sub
--
Don Guillett
SalesAid Software

"Josh O." wrote in message
...
Is it possible to run only a portion of a macro?

I am writing a long involved macro and I need to test each section to make
sure it is producing the desired result before I write the next section of
the macro. I was hoping I could run Section 1, write section 2, run

section
2 only, write section 3, run section 3 only...

How can I do that?






All times are GMT +1. The time now is 07:28 AM.

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