Hi,
Is there an one simple code which provide deleting all user-defined variables once ?
Regards.
I mean clear all user-defined variables from excel cache...
Hi,
Is there an one simple code which provide deleting all user-defined variables once ?
Regards.
I mean clear all user-defined variables from excel cache...
Last edited by HerryMarkowitz; 12-26-2013 at 08:03 AM.
Sub DontForgetThese() If Your thread includes any code Then Please use code tags... If Your thread has been solved Then Please mark as solved... If Anybody has helped to you Then Please add reputation... End Sub
See here after a macro to do the list of the names and another one to delete name which ARE in column "B" in the sheet where are the names
Please Login or Register to view this content.
Hi PCI,
I didnt say clear names...
I said clear user-defined variables from excel vba cache...
Thanks anyway.
What VBA cache?
If posting code please use code tags, see here.
Can you send a short example to high light the issue you are running into
My question was so simple.
Lets make an example.
There is a Set ws = Nothing line at the end of folllowing code.
That line set ws to nothing.
So, how can I set all user-defined variables to nothing ?Please Login or Register to view this content.
I need a code like this;
BRPlease Login or Register to view this content.
Last edited by HerryMarkowitz; 12-26-2013 at 12:43 PM.
Hi,
see the End statement …
Or push the Reset button on the VBE Standard Toolbar, or Run > Reset
Entia non sunt multiplicanda sine necessitate
Hi Marc L,
I have no idea what you are trying to say...
The End statement executed anywhere resets all project variables.
Please Login or Register to view this content.
You want to set all variables to null value. I take it that you are probably using global variables. I would suggest that you write a sub that will empty out all your global variables and all you will need to do is call that sub whenever you need.
If you need to empty out a variable multiple times in a single sub i would suggest you rewrite your code so the variables don't have to be constantly emptied out. Instead write it in a way so you can re-run the sub multiple times, and every instance will start with empty values by default.
Herry
In your example there's no need for the line setting ws to Nothing.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks