
VBA Excel macro 'File Save As ....' problem
Maybe you could check that cell first. If it's filled in, then don't ask.
in auto_open or workbook_open
if isempty(worksheets("sheet1").range("a1")) then
'ask the questions
else
'don't ask, don't tell.
end if
If your macro created the workbook and then saved it, you could also check to
see if the workbook's path existed. If it does, then it's been saved at least
once before.
Same spot:
if thisworkbook.path = "" then
'get name
else
'opening an existing file
end if
Quote:
> Hi
> I have written a macro which would ask the user a name, the name is
> then entered in a particular cell of the sheet and saved as
> '<name>.xls'. But the new xls file created also asks for a name when
> opened. Kindly help me out to prevent this macro getting run in the
> file created.
> Thanx in advance
> Kannan
--
Dave Peterson