happyhungarian
Active Member
- Joined
- Jul 19, 2011
- Messages
- 252
- Office Version
- 365
- Platform
- Windows
Hi, I'm using the following code to have the file save based upon on a value that is in cell D1. I don't want to predetermine the file path. I want the Save As window to pop up but with the file name prepopulated. It actually does all that but then when I select the destination folder and hit "Save" nothing happens. No new file is saved. The file that stays open is the same file I had before. It's not renamed or anything.
Sub cmdSave_Click()
Dim ThisFile As String
ThisFile = Sheets("OfferLetter").Range("D1").Value
Dim thefilename As String
thefilename = Application.GetSaveAsFilename _
(ThisFile, filefilter:="Excel Files, *.xls")
End Sub
Sub cmdSave_Click()
Dim ThisFile As String
ThisFile = Sheets("OfferLetter").Range("D1").Value
Dim thefilename As String
thefilename = Application.GetSaveAsFilename _
(ThisFile, filefilter:="Excel Files, *.xls")
End Sub