Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,113
- Office Version
- 365
- Platform
- Windows
Hi All,
At times the excel file saves itself as the workbook name + the computer device name automatically.
I'm using this code to deter this "type" of action but it looks like I am in need of an adjustment.
Can someone care to led a hand?
Many thanks!
pinaceous
At times the excel file saves itself as the workbook name + the computer device name automatically.
I'm using this code to deter this "type" of action but it looks like I am in need of an adjustment.
Can someone care to led a hand?
VBA Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'10MAY23
If ActiveWorkbook Is ThisWorkbook Then
Dim strWBName As String
strWBName = ActiveWorkbook.Name
If SaveAsUI = True Then
Cancel = True
MsgBox "AUTOSAVED !! Document!", vbInformation, "ProjectUpdate."
End If
End If
End Sub
Many thanks!
pinaceous
Last edited: