Thread: File-Save
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default File-Save

In the ThisWorkbook code module (not a regular code module) use
code like the following:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel
As Boolean)
Dim PW As String
PW = InputBox("Enter a password")
If PW = "" Then
' no password entered, cancel save
Cancel = True
Else
' do something with PW
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com






"savehelp" wrote in message
...
When the user cliks on File Save, I want to interrupt and ask

for a password.
Can someone please help!!!