Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Change a buton "Caption" from VBA 0000_AAAA_0000[_5_] Excel Programming 2 November 1st 04 03:15 AM
myMenul.Caption = "P&L Report" JON JON Excel Programming 2 November 29th 03 09:27 AM


All times are GMT +1. The time now is 10:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"