G
Guest
Hi,
I'm building a code where at some point I need to save the file to a new location with a specific file name, which is also specified by the code. I would like to be prompted for this but it only saves if I specify the path.
This is the bit I have already written and can't go further:
Dim NewName As String
NewName = mRateName & " " & Validade & ".xls"
If MsgBox("Save file as " & NewName & "?", vbYesNo, Save) = vbNo Then
Exit Sub
ActiveWorkbook.SaveAs FileName:=NewName
Can anyone help me?
Thanks
I'm building a code where at some point I need to save the file to a new location with a specific file name, which is also specified by the code. I would like to be prompted for this but it only saves if I specify the path.
This is the bit I have already written and can't go further:
Dim NewName As String
NewName = mRateName & " " & Validade & ".xls"
If MsgBox("Save file as " & NewName & "?", vbYesNo, Save) = vbNo Then
Exit Sub
ActiveWorkbook.SaveAs FileName:=NewName
Can anyone help me?
Thanks