Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Did you declare the variable locally or globally? A local variable s/b
destroyed when the sub terminates, global will not (which is a the primary reason for using it). One other means to make a local variable retain it's value after the sub terminates is to declare the variable as static (just an FYI - I doubt that is the case). Global: Dim x As String Sub Test ... End Sub Local Sub Test Dim x As String ... End Sub Static: Sub Test Static x As String .... End Sub "Excel 009" wrote: I am using the folder picker code from John Walken's site. I have a Sub that brings up the folder picker dialog box. I assigned a string variable to the selected folder name. After I ran the code, select the folder and click Ok, the folder value is stored in the string variable. When I ran the code again (after some procedures took place), before I selected the folder, the string variable still had the value from the prior selection. Does any one know how to get ride of the buffered value without setting the string variable to a blank value. Just curiours. - Excel 009 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Read Keyboard Buffer ? | Excel Programming | |||
Save file in a new folder, but create folder only if folder doesn't already exist? | Excel Programming | |||
buffer overflow | Excel Programming | |||
Folder picker default - second attempt... | Excel Programming | |||
Folder picker: default to network share? | Excel Programming |