Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code ina standard module, the user can enter there own
file name via a form. Sub The_SubSave() Dim fName As String fName = frmOptions.TextBox1.Value If frmOptions.CheckBox2.Value = False Then ActiveWorkbook.SaveCopyAs "C:\AutoSaves" & "fName" _ & "." & Format(Date, "dd-mmm-yyyy") & "." & Format(Time, "hh-mm-ss") & ".xls" Else ActiveWorkbook.SaveCopyAs "C:\AutoSaves\DDE Sheet" _ & "." & Format(Date, "dd-mmm-yyyy") & "." & Format(Time, "hh-mm-ss") & ".xls" End If StartTimer End Sub The problem is if the checkbox is false the first if statement which include the textbox value as part if the file path does'nt work. Ive trie placing in( ) and " " of having the tectbox in the string but it does not wok! The Else option works fine! Does anyone have any suggestions Thanks in advance for any help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
textbox to file (.txt or .doc) | Excel Programming | |||
need to add string to txt file | Excel Programming | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming | |||
Retaining value of a string from a textbox on a form ?? | Excel Programming | |||
Textbox & Save file problem | Excel Programming |