Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Declaring a function to destroy varibles at End Sub

Status
Not open for further replies.

joelwenzel

Programmer
Jun 28, 2002
448
Is there a way to create variables in a function so that they are destroyed when the function is finished processing?

I want to be able to declare a variable in two separate functions that have the same name but I cannot if I can't destroy it at the end of the function
 
Just use two different variables...

I believe

Set MyString = Nothing

will distroy it if im not mistaken..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top