LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default losing variable after "unload me"

Hello,

I am using a form to gather information and assigning some of the
information to a variable to use as a file name. My problem is that I need
to unload the form before I can pragmatically save the file. But if I
unload the file, I lose the variable value "strCSVFile". Is there a way to
save the value even if you unload the form?

Private Sub cmdOK_Click()
...
strCSVFile = "some file name"
Unload Me
Call BuildCSVFile(strCSVFile)
...
ActiveWorkbook.SaveAs Filename:=strPath, FileFormat:=xlCSV,
CreateBackup:=False
End Sub

Any help would be appreciated.

--
Thanks in advance,

Steven


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting Rows...but losing "FORMAT" FLKULCHAR Excel Discussion (Misc queries) 1 March 23rd 10 03:14 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
HOW CAN I SORT A "RANKED" COLUMN WITHOUT LOSING THE FORMULA? dbgskid Excel Worksheet Functions 1 May 31st 06 11:50 AM
"Unload" selection after running macro? Ed[_9_] Excel Programming 3 January 21st 04 03:17 PM


All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"