Print if populated
Tom
Nope cant get this working I get a Subscript out of range error when I
click the button? Am I missing something here?
Stuart
"Tom Ogilvy" wrote in message
...
Private Sub Commandbutton1_Click()
if len(trim(Worksheets("continutation sheet").Range("B5").Text)) 0 then
Application.ScreenUpdating = False
Worksheets("continuation sheet").Visible = xlSheetVisible
Worksheets("continuation sheet").Printout
Worksheets("continuation sheet").Visible = xlSheetHidden
Application.ScreenUpdating = True
End if
End Sub
--
Regards,
Tom Ogilvy
Stuart Evans wrote in message
...
Tom
Thanks for the reply however I cant seem to get this working can you
explain where I put this code please.
Stuart
"Tom Ogilvy" wrote in message
...
if len(trim(Worksheets("continutation sheet").Range("B5").Text)) 0
then
Application.ScreenUpdating = False
Worksheets("continuation sheet").Visible = xlSheetVisible
Worksheets("continuation sheet").Printout
Worksheets("continuation sheet").Visible = xlSheetHidden
Application.ScreenUpdating = True
End if
--
Regards,
Tom Ogilvy
Stuart Evans wrote in message
...
Hi All
I have a workbook with a number of sheets one of which is hidden
and
called "continuation sheet" I have a command button on a frontend
sheet
with
a macro attached. What i need to do is look at the sheet named
"continuation
sheet" and if cell B5 is populated print the sheet.
Stuart
|