Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
testing range of cells for part of cell content | Excel Worksheet Functions | |||
Replace Old Part Numbers with New Part Numbers in a Macro. | Excel Discussion (Misc queries) | |||
Testing Spreadsheet Cells while in a Macro | Excel Discussion (Misc queries) | |||
Testing in a macro for bad range name? | Excel Programming | |||
Macro Date Testing | Excel Programming |