BeforePrint Caption = ""
Irma,
Check your End Ifs and End Withs.
But what is the use nested "With DialogSheets("Dialpassword")"
And won't "senham" always ="" ?
NickHK
"IRMA MENDOSA" wrote in message
...
Does Any One Knows How to make this Work
Thanks In Advance
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Cheque" Then
Application.ScreenUpdating = False
If DialogSheets("Dialpassword").Show Then
With DialogSheets("Dialpassword")
.Unprotect ("USA")
.EditBoxes(1).Caption = ""
With DialogSheets("Dialpassword")
senham = .EditBoxes(1).Caption
If senham < "your Password here" Then
MsgBox "Get a Password!", , "Mexican Furniture"
End With
End If
End With
End If
Cancel = True
End If
End Sub
|