Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello all
This is how my button is programmed... ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------- Private Sub UserForm_Initialize() Me.TextBox1.Text = Date End Sub Private Sub CommandButton1_Click() MyPath = "\\tprc1fanp001\shared\Enforcement, Enquiry & Complaints\Manual Payment History\" 'Set the Path MyFileName = "Date" & Me.TextBox1.Text & ".xls" 'Create the File Name MySaveString = MyPath & MyFileName 'String the two together ActiveWorkbook.SaveAs Filename:=MySaveString, FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------- This is my error message: Run Time Error '1004': Microsoft Excel cannot access the file '\\tprc1fanp001\shared\Enforcement, Enquiry & Complaints\Manual Payment History\Date06\02' There are several possible reasons: -The file name or path name does not exist -The file you're trying to open is being used by another program. Close the document in the other program, and try again End or Debug ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------- Why is file attempting to save as Date06\02? Thank you in advanced |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro - save to current location vs excel default location | Excel Discussion (Misc queries) | |||
how to get disk icon on save button of save as dialog like 2000 | Excel Discussion (Misc queries) | |||
Button Error - Save at location | Excel Programming | |||
Button - Save Location | Excel Programming | |||
Location of control button | Excel Programming |