ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open workbook properties on save. (https://www.excelbanter.com/excel-programming/366588-open-workbook-properties-save.html)

Colinhp

Open workbook properties on save.
 
Please can someone tell me what the VBA code is to open the Workbook
properties dialogue box when a user first saves an Excel workbook?

Ardus Petus

Open workbook properties on save.
 
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim dLastSaved As Date
On Error Resume Next
dLastSaved = Me.BuiltinDocumentProperties("Last save time").Value
If Err < 0 Then
Application.Dialogs(xlDialogProperties).Show
End If
End Sub

This code is to be pasted into ThisWorkbook Code

HTH
--
AP

"Colinhp" a écrit dans le message de
news: ...
Please can someone tell me what the VBA code is to open the Workbook
properties dialogue box when a user first saves an Excel workbook?





All times are GMT +1. The time now is 04:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com