Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine if an Excel workbook has ever been saved?

Tags:

excel

vba

How can I tell, using VBA, if an Excel workbook has ever been saved?

I want to know if clicking save will save the document to an existing location or prompt me to choose a save location.

like image 443
ChrisB Avatar asked Jul 26 '18 02:07

ChrisB


1 Answers

If ActiveWorkbook.Path = vbNullString Then
    'actions if the active workbook hasn't been saved yet go here
Else
    '....
End If
like image 137
Jalal Avatar answered Sep 23 '22 01:09

Jalal