![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Is there a way to test VBA code without actually running it i.e. compiling it first to make code is correct?
RET79 |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Sure.
In your VBE, click on Debug, Compile VBA Project. Tom |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Tom,
It won't let me select that option, any ideas why? Thanks for your help, RET79 |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Sure.
When you run the code, it first compiles, then runs. If you have run or compiled the code with zero errors, the option to compile will not be available until you edit the code anywhere in your project or close and reopen the workbook. Tom |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Tom,
Thanks for clearing that up for me. RET79 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|