Excel kept on asking to save file every time I jump from one sheet to another!
Hi Ken,
No, I don't have any code to close the file. I have around 60 sheets
total in the workbook. I have written the worksheet protection function
that protects all the sheets at once. I wonder if that would cause the
problem.
Here is the code that i used to protect all the sheets:
Sub Protect_Sheets()
Dim wSheet As Worksheet
Sheet15.Select 'Activate this sheet to update the
values
Sheet22.Select 'Activate this sheet to update the
values
Sheet47.Select 'Activate this sheet to update the
values
Sheet50.Select 'Activate this sheet to update the
values
Sheet51.Select 'Activate this sheet to update the
values
Sheet52.Select 'Activate this sheet to update the
values
If txtPW < "XXXX" Then
MsgBox ("INCORRECT PASSWORD! PLEASE ENTER PASSWORD AGAIN:")
txtPW = ""
Exit Sub
End If
For Each wSheet In Worksheets
If wSheet.ProtectContents = False Then
wSheet.Protect Password:=txtPW
End If
Next wSheet
txtPW = ""
cmd_OK.Caption = "UnProtect"
cmd_ProtectData.Caption = "UnProtect Data Sheet"
' Unload Me
End Sub
Ken Wright wrote:
It doesn't have any code that closes the file at all?
Regards
Ken..............
wrote in message
ups.com...
Hi Ken,
I used the macros to send emails and update the values whenever the
sheet is activated. The macro that i used for sending emails is based
on the click buttons (command buttons).
Thanks,
Tim
<snip
|