M
MeistersingerVonNurnberg
Hi All -
I've got a function call to save a workbook in the ThisWorkbook BeforeClose.
The function contains the following line:
Workbooks(sWbName).SaveAs Filename:=var_FileName
where, sWbName is a String, which is passed to the function as
ThisWorkbook.Name
and, var_FileName is a local Variant that is set as follows:
var_FileName = Application.GetSaveAsFilename(not showing args)
For whatever reason, the SaveAs line is not working. It raises no Err. Through
the debugger, sWbName is set as the currently opened workbook, and is correct.
Also through the debugger, var_FileName gets set properly by
Application.GetSaveAsFilename(), and contains the full path to the file.
Any ideas? Thanks.
I've got a function call to save a workbook in the ThisWorkbook BeforeClose.
The function contains the following line:
Workbooks(sWbName).SaveAs Filename:=var_FileName
where, sWbName is a String, which is passed to the function as
ThisWorkbook.Name
and, var_FileName is a local Variant that is set as follows:
var_FileName = Application.GetSaveAsFilename(not showing args)
For whatever reason, the SaveAs line is not working. It raises no Err. Through
the debugger, sWbName is set as the currently opened workbook, and is correct.
Also through the debugger, var_FileName gets set properly by
Application.GetSaveAsFilename(), and contains the full path to the file.
Any ideas? Thanks.