Help on GetSaveas Filename

  • Thread starter Thread starter Utkarsh
  • Start date Start date
U

Utkarsh

Hi
While trying to save I file that I have created I am getting a "Type
Mismatch" error on the line
" If flname = False Then".

I would appreciate if someone can point out the mstake that I am making
(see code below).

Thanks
Utkarsh
******************************************************
flname = Application.GetSaveAsFilename
'MsgBox flname

If flname = False Then
MsgBox "Filename not selected"
ActiveWorkbook.Close False
Sheets("Cover Page").Select
Exit Sub
Else
ActiveWorkbook.Save
ActiveWorkbook.Close False
End If
 
Hi Utkarsh,

dim flname as variant (so that it can hold string and boolean False).

Regards,
Ivan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SAVE AS MACRO 6
PLEASE HELP!! SAVE MACRO 2
SAVE AS MACRO 4
Macro to save as 2
Save file macro 2
help with VBA program to import and add formatted files to one file 0
SAVE AS MACRO 8
Help with code 2

Back
Top