Hi Tom
I am not sure what Norman Tested that worked:
My apologies, Tom and Daminc.
I re-tested my own code, using Daminc's variable names and, not
surprisingly, it worked. Then, with my mind elsewhere, I responded
nonsensically!.
---
Regards,
Norman
"Tom Ogilvy" wrote in message
...
Hopefully this will give you a clue. I am not sure what Norman Tested
that
worked:
Sub aBC()
If "C:\ABC\Myfiles.xls" Then
MsgBox "OK"
Else
MsgBox "Not OK"
End If
End Sub
The above is the situation you create if the user selects file name on the
first showing of the dialog. (this does raise a type mismatch error
becuase
the IF is looking for a boolean)
so your "latest" code
If (Application.GetSaveAsFilename(wrkbkname, fileFilter:="Excel Files
(*.xls), *.xls")) Then
savewrkbkname = Application.GetSaveAsFilename(wrkbkname,
fileFilter:="Excel Files (*.xls), *.xls")
Else: ActiveWorkbook.Close
End If
will raise an error unless the user cancels. If it did work, then you
would
show the file SaveAS dialog twice which is pretty lame as well.
--
Regards,
Tom Ogilvy
"Daminc" wrote in
message ...
Hi Norman, before I try that (there is a lot of code in total and your
suggestion would require a lot of changes) is there any reason that you
can see that would result in my code bringing up a Type Mismatch error?
--
Daminc
------------------------------------------------------------------------
Daminc's Profile:
http://www.excelforum.com/member.php...o&userid=27074
View this thread:
http://www.excelforum.com/showthread...hreadid=507586