String Deleting

  • Thread starter Thread starter McCoy
  • Start date Start date
M

McCoy

Hi

Can someone tell me a way to delete strings in Visual Basic once the Sub
Function is complete

Thanks
 
If the variable is declared within the procedure, without using the Static
keyword, it is disposed of automatically when the procedure exits.

If you really want to, you could assign the empty string to the variable
before exiting the procedure (strMyStringVariable = vbNullString) but there
really isn't any point.

VB/VBA are not like C/C++, where you need to worry about allocating and
freeing variable memory. VB and VBA take care of most of those issues
automatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top