View Single Post
  #21   Report Post  
Posted to microsoft.public.excel.programming
Excel 009 Excel 009 is offline
external usenet poster
 
Posts: 29
Default How can I clean the buffer from the folder picker?

What I meant
program = Subs
workbook = Excel file

When the program finishs, a public variable will be terminated, but I
want to know if there is a way to keep it still alive.

Here is an example:

Say this is the only code in my module in the whole project.

Public strX as String

Function getString(str as String) as String
strX = str
getString = strX
End Function

Sub x()
Msgbox getString
End Sub

After I ran Sub x(), the

The message came up and after I click Ok, the program terminated. stX
is lost.
I want to know if there is a way to keep it still alive (not store it
physically some where, but only in memory).