Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Want only rows with populated data | Excel Worksheet Functions | |||
how can i show/print just populated rows from a list | Excel Discussion (Misc queries) | |||
Macro button to print sheets populated from drop-down list | Excel Discussion (Misc queries) | |||
First populated cell in row array/ Last populated cell in row arra | Excel Worksheet Functions | |||
populated | Excel Discussion (Misc queries) |