hi i get a debug error with the following line. why is that?
ActiveWorkbook.SaveAs Filename:=pathname & SaveFile & "test1.xlsb" ActiveWorkbook.Close
hi i get a debug error with the following line. why is that?
ActiveWorkbook.SaveAs Filename:=pathname & SaveFile & "test1.xlsb" ActiveWorkbook.Close
check your variables pathname and SaveFile if they are not NULL or empty
oK i have found that this error occurs because I have already got a file named as test1. how can i overwrite it?
Here's one way:
Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:=pathname & SaveFile & "test1.xlsb" Application.DisplayAlerts = True ActiveWorkbook.Close
Anyone who confuses correlation and causation ends up dead.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks