Determine if an Excel workbook has ever been saved?

前端 未结 3 1883
迷失自我
迷失自我 2021-01-04 13:45

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 c

3条回答
  •  孤街浪徒
    2021-01-04 13:56

    If ActiveWorkbook.Path = vbNullString Then
        'actions if the active workbook hasn't been saved yet go here
    Else
        '....
    End If
    

提交回复
热议问题