Cut and Paste procedure then test it in Immediate window

N

nick kress

I am unable to cut and paste procedures from your site and test it in
Immediate window
i type in Debug.Print procedureName just before End function / Sub
When I type in the procedure name in Immediate window ( reply is Function /
Sub) not defined
What am I doing wrong?
 
D

Douglas J. Steele

You're not trying to copy all of the code into the Immediate window, are
you?

The code needs to be copied into a module. Then you can type the name of the
procedure in the Immediate window to execute the code. (It's not necessary
to save the module in order to run the code). Remember that when you do save
the module, the module must have a different name than the routine(s) within
it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top