Hi,
I have a Macro Enabled Workbook (Workbook A) that I use GetOpenFilename to open another Workbook (Workbook B). After changing data in Workbook B from Workbook A, I wish to do a Save As on Workbook B from Workbook A.
Is this possible?
In Workbook A I have the following code:
Private Sub CommandButton7_Click()
Workbooks(TextBox1.Value).Activate ' Activate the Workbook previously opened using GetOpenFilename
FName = Application.GetSaveAsFilename(InitialFileName:=TextBox1.Value, _
FileFilter:="Excel Files (*.xlsx), *.xlsx", Title:="DMS File To Be Saved")
If FName = False Then Exit Sub
End Sub
The Save As Dialog box is presented. When I update the File Name to Save and then press the Save button, return back to my code occurs and FName is not False (it contains the path and filename that I am trying to save).
The problem is, the file I am saving does not exits.
Any help would be appreciated.
Thanks
I have a Macro Enabled Workbook (Workbook A) that I use GetOpenFilename to open another Workbook (Workbook B). After changing data in Workbook B from Workbook A, I wish to do a Save As on Workbook B from Workbook A.
Is this possible?
In Workbook A I have the following code:
Private Sub CommandButton7_Click()
Workbooks(TextBox1.Value).Activate ' Activate the Workbook previously opened using GetOpenFilename
FName = Application.GetSaveAsFilename(InitialFileName:=TextBox1.Value, _
FileFilter:="Excel Files (*.xlsx), *.xlsx", Title:="DMS File To Be Saved")
If FName = False Then Exit Sub
End Sub
The Save As Dialog box is presented. When I update the File Name to Save and then press the Save button, return back to my code occurs and FName is not False (it contains the path and filename that I am trying to save).
The problem is, the file I am saving does not exits.
Any help would be appreciated.
Thanks