Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Excel 2003, hiding and showing sheets

Hi all Gurus, I have a button and when clicked I need to work out if cell c
35 is less than 10000 and if so show sheets:

- Sheets 2,4,8

and if cell C35 is greater than 10000 show:

- Sheets 3,5,6,7

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Excel 2003, hiding and showing sheets


Dim varData as Variant
varData = ActiveSheet.Range("C35")

If varData < 10000 Then
Sheets(2).Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
Sheets(3).Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If
--
Jacob


"Neil Holden" wrote:

Hi all Gurus, I have a button and when clicked I need to work out if cell c
35 is less than 10000 and if so show sheets:

- Sheets 2,4,8

and if cell C35 is greater than 10000 show:

- Sheets 3,5,6,7

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Excel 2003, hiding and showing sheets

Thanks for that jacob, if the sheets are named do i just do the following:
Dim varData as Variant

varData = ActiveSheet.Range("C35")

If varData < 10000 Then
payment cert.Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
small works order.Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If




"Jacob Skaria" wrote:


Dim varData as Variant
varData = ActiveSheet.Range("C35")

If varData < 10000 Then
Sheets(2).Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
Sheets(3).Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If
--
Jacob


"Neil Holden" wrote:

Hi all Gurus, I have a button and when clicked I need to work out if cell c
35 is less than 10000 and if so show sheets:

- Sheets 2,4,8

and if cell C35 is greater than 10000 show:

- Sheets 3,5,6,7

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Excel 2003, hiding and showing sheets

as below

Sheets("payment cert").Visible = True

--
Jacob


"Neil Holden" wrote:

Thanks for that jacob, if the sheets are named do i just do the following:
Dim varData as Variant

varData = ActiveSheet.Range("C35")

If varData < 10000 Then
payment cert.Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
small works order.Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If




"Jacob Skaria" wrote:


Dim varData as Variant
varData = ActiveSheet.Range("C35")

If varData < 10000 Then
Sheets(2).Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
Sheets(3).Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If
--
Jacob


"Neil Holden" wrote:

Hi all Gurus, I have a button and when clicked I need to work out if cell c
35 is less than 10000 and if so show sheets:

- Sheets 2,4,8

and if cell C35 is greater than 10000 show:

- Sheets 3,5,6,7

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Excel 2003, hiding and showing sheets

Would it be possible to then ask the user if they would like to print the
visable sheets? If yes then print if no then exit sub?

Thanks for your help Jacob.

"Jacob Skaria" wrote:

as below

Sheets("payment cert").Visible = True

--
Jacob


"Neil Holden" wrote:

Thanks for that jacob, if the sheets are named do i just do the following:
Dim varData as Variant

varData = ActiveSheet.Range("C35")

If varData < 10000 Then
payment cert.Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
small works order.Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If




"Jacob Skaria" wrote:


Dim varData as Variant
varData = ActiveSheet.Range("C35")

If varData < 10000 Then
Sheets(2).Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
Sheets(3).Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If
--
Jacob


"Neil Holden" wrote:

Hi all Gurus, I have a button and when clicked I need to work out if cell c
35 is less than 10000 and if so show sheets:

- Sheets 2,4,8

and if cell C35 is greater than 10000 show:

- Sheets 3,5,6,7

Thanks



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Excel 2003, hiding and showing sheets

Hi Neil

Try out the below

Dim ws as Worksheet
If MsgBox("Print visible sheets", vbYesNo) = vbYes Then
For Each ws In Sheets
If ws.Visible Then ws.PrintOut Copies:=1, Collate:=True
Next
Else
Exit Sub
End If


--
Jacob


"Neil Holden" wrote:

Would it be possible to then ask the user if they would like to print the
visable sheets? If yes then print if no then exit sub?

Thanks for your help Jacob.

"Jacob Skaria" wrote:

as below

Sheets("payment cert").Visible = True

--
Jacob


"Neil Holden" wrote:

Thanks for that jacob, if the sheets are named do i just do the following:
Dim varData as Variant

varData = ActiveSheet.Range("C35")

If varData < 10000 Then
payment cert.Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
small works order.Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If



"Jacob Skaria" wrote:


Dim varData as Variant
varData = ActiveSheet.Range("C35")

If varData < 10000 Then
Sheets(2).Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
Sheets(3).Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If
--
Jacob


"Neil Holden" wrote:

Hi all Gurus, I have a button and when clicked I need to work out if cell c
35 is less than 10000 and if so show sheets:

- Sheets 2,4,8

and if cell C35 is greater than 10000 show:

- Sheets 3,5,6,7

Thanks

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Excel 2003, hiding and showing sheets

Brilliant Jacob, Can i have it so that it hides set up sheet before print?

"Jacob Skaria" wrote:

Hi Neil

Try out the below

Dim ws as Worksheet
If MsgBox("Print visible sheets", vbYesNo) = vbYes Then
For Each ws In Sheets
If ws.Visible Then ws.PrintOut Copies:=1, Collate:=True
Next
Else
Exit Sub
End If


--
Jacob


"Neil Holden" wrote:

Would it be possible to then ask the user if they would like to print the
visable sheets? If yes then print if no then exit sub?

Thanks for your help Jacob.

"Jacob Skaria" wrote:

as below

Sheets("payment cert").Visible = True

--
Jacob


"Neil Holden" wrote:

Thanks for that jacob, if the sheets are named do i just do the following:
Dim varData as Variant

varData = ActiveSheet.Range("C35")

If varData < 10000 Then
payment cert.Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
small works order.Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If



"Jacob Skaria" wrote:


Dim varData as Variant
varData = ActiveSheet.Range("C35")

If varData < 10000 Then
Sheets(2).Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
Sheets(3).Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If
--
Jacob


"Neil Holden" wrote:

Hi all Gurus, I have a button and when clicked I need to work out if cell c
35 is less than 10000 and if so show sheets:

- Sheets 2,4,8

and if cell C35 is greater than 10000 show:

- Sheets 3,5,6,7

Thanks

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Excel 2003, hiding and showing sheets

I've managed it myself. May i just say Jacob you are always a great help!!!

Keep up the good work.

"Neil Holden" wrote:

Brilliant Jacob, Can i have it so that it hides set up sheet before print?

"Jacob Skaria" wrote:

Hi Neil

Try out the below

Dim ws as Worksheet
If MsgBox("Print visible sheets", vbYesNo) = vbYes Then
For Each ws In Sheets
If ws.Visible Then ws.PrintOut Copies:=1, Collate:=True
Next
Else
Exit Sub
End If


--
Jacob


"Neil Holden" wrote:

Would it be possible to then ask the user if they would like to print the
visable sheets? If yes then print if no then exit sub?

Thanks for your help Jacob.

"Jacob Skaria" wrote:

as below

Sheets("payment cert").Visible = True

--
Jacob


"Neil Holden" wrote:

Thanks for that jacob, if the sheets are named do i just do the following:
Dim varData as Variant

varData = ActiveSheet.Range("C35")

If varData < 10000 Then
payment cert.Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
small works order.Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If



"Jacob Skaria" wrote:


Dim varData as Variant
varData = ActiveSheet.Range("C35")

If varData < 10000 Then
Sheets(2).Visible = True
Sheets(4).Visible = True
Sheets(8).Visible = True
ElseIf varData 10000 Then
Sheets(3).Visible = True
Sheets(5).Visible = True
Sheets(6).Visible = True
Sheets(7).Visible = True
End If
--
Jacob


"Neil Holden" wrote:

Hi all Gurus, I have a button and when clicked I need to work out if cell c
35 is less than 10000 and if so show sheets:

- Sheets 2,4,8

and if cell C35 is greater than 10000 show:

- Sheets 3,5,6,7

Thanks

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
macro showing and hiding detail KC Excel Discussion (Misc queries) 1 October 20th 09 07:56 PM
Hiding/Showing Rows on Cell H2 Change Rob Excel Discussion (Misc queries) 9 December 14th 08 01:44 AM
Hiding and Showing Sheets using Macro engbe Excel Discussion (Misc queries) 3 May 12th 08 05:14 AM
Showing and hiding series in charts Matt H Excel Discussion (Misc queries) 2 February 28th 08 10:14 PM
hiding and showing graphs chrisrowe_cr Excel Worksheet Functions 0 September 2nd 05 11:22 AM


All times are GMT +1. The time now is 04:34 AM.

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"