Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Scripting in Immediate Window

is it possible to code short scripts in Immediate Window in VBA?
When I was using for example R or Python I had always open console in which I could easly check how short code is working (for example check the result of For loop if it returns range [a, b] or [a, b))
So for example: can I write

For i = 0 to 5
   Debug.Print i
Next i

and run it without creating new module file/creating extra Sub?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can put this in the immediate window:

For i = 0 to 5: Debug.Print i : Next i and press enter

It is not possible to have line breaks. But instead use a colon.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading