i'm using the following code to force saving a file into a predetermined path and folder...
sometimes, the user accidentally uses a "special character" in one of the cells and the file won't save...
i would like to have an error message, alerting the user to this problem (and ask them to rename and save again...)...
???
customerName = Range("h6").Value
customerjobwork = Range("h7").Value
mysalesyear = Range("h4").Text
Dim myfilename As String
Dim newfile As Variant
customerjobwork & "-" & mysalesyear
myfilename = "c:\temp\" & customerName & " - " & customerjobwork & " - " & mysalesyear
newfile = Application.GetSaveAsFilename(myfilename)
If Not newfile Then Exit Sub
ActiveWorkbook.SaveAs filename:= _
newfile, FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
Application.WindowState = xlMaximized
Display More
thank you...