I'm looking for a scratchpad to throw code in and see if it works. Something like dotnetfiddle.net but for VBA.
I'm looking for a scratchpad to throw code in and see if it works. Something like dotnetfiddle.net but for VBA.
if you press f8 you can step through the code or select a line and press f9 to set a breakpoint. Not sure if that helps but its what I do to test code
Doing that already.
Testing this code atm.
Please Login or Register to view this content.
Last edited by Look, More, What; 07-14-2017 at 11:46 AM. Reason: Fixed it
I usually create my own scratchpad Sub at the end of the code module where I try out stuff, I call mine Foo()
typically it's where I'll create small sections of code or try things out for the first time. it's usually littered with multiple Debug.Print lines so I can see results as I step through, or I use the locals window.
I make sure it never outputs results to the workbook so I'm never in danger of messing up any of the 'live' data. I use it work through logic and also throw in edge cases etc to ensure it's behaving as needed before I deploy it into the main workbook code.
You know you can run code from the Immediate window?
Please Login or Register to view this content.
Entia non sunt multiplicanda sine necessitate
You can get a little complicated with the Immediate Window
OK - so it's nonsensical but just to illustrate iterating a Do or For loopPlease Login or Register to view this content.
I keep a workbook with all the code I've written, it's now got 97 sheets that get used and reused for different tasks
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
I will start using this Immediate Window.
Wow.... 97 sheets... I don't think you can call that a workbook anymore.
Playbook?????
Just bear in mind you are limited to statements on 1 line only... To really check out code add it as a Public Sub to a scratch module and call it from the Immediate Window or, if the procedure does not take any parameters, click the mouse anywhere in the procedure body and press F8 to start single stepping or F5 to just run it.... will start using this Immediate Window
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks