View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Akihito Yamashiro[_2_] Akihito Yamashiro[_2_] is offline
external usenet poster
 
Posts: 14
Default ActiveWorkbook.Save saves to wrong directory

Check if the book is saved on a file system.
ActiveworkBook.Path can be used for the purpose.

Sub Main()
If ActiveWorkbook.Path = "" Then
MsgBox "Save the file before the process."
Exit Sub
Else
ActiveWorkbook.Save
'Do something here.
End If
End Sub


If this doesn't help you, the file may be in the 'Program Files'
folder and the PC is Windows Vista or 7,
the file path may be redirected to the VirtualStore folder.