BeforePrint Caption = ""
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 |
BeforePrint Caption = ""
We don't have that DialogSheet, but that apart, what happens when you run
it? -- HTH Bob Phillips "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 |
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 |
All times are GMT +1. The time now is 10:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com