Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Print if populated

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Print if populated

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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Print if populated

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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Print if populated

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








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












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Print if populated

if len(trim(Worksheets("continutation sheet").Range("B5").Text)) 0 then

has continuation mispelled.

if len(trim(Worksheets("continuation sheet").Range("B5").Text)) 0 then

--
Regards
Tom Ogilvy

Stuart Evans wrote in message
...
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












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
Want only rows with populated data Pete[_7_] Excel Worksheet Functions 1 April 12th 11 04:21 PM
how can i show/print just populated rows from a list PomgolianJen Excel Discussion (Misc queries) 0 September 10th 08 03:31 AM
Macro button to print sheets populated from drop-down list AB3 Excel Discussion (Misc queries) 7 July 11th 08 01:03 AM
First populated cell in row array/ Last populated cell in row arra Skyscan Excel Worksheet Functions 7 May 29th 08 05:20 PM
populated Abhishek kedia Excel Discussion (Misc queries) 3 May 9th 06 08:45 PM


All times are GMT +1. The time now is 07:21 AM.

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

About Us

"It's about Microsoft Excel"