Hi,
I am new to excel VBA and Macros. I am trying to create a click button to automatically generate a random number (1000,9999) to "F5" cell in my worksheet. I have created the form Button used record macros to record the steps using the RAND(1000,9999) function typed into F5 after I click the button.
This is the code I am running:
When I click the button I am getting VBA compile error: "invalid outside procedure". I read that this error is to do with declaring variables but I am not sure if this is the case here.
Any help is appreciated. Thanks.
Bookmarks