Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Am trying to hide a worksheet through VBA code. The line of code below ought to do that: worksheets(1).visible = xlveryhidden But it doesn't work!! Anyone with ideas?? -- Many thanks in advance for any assistance Marek |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Demo'd from the immediate window
? xlSheetVeryHidden 2 ? xlVeryHidden 2 shouldn't make any difference. Use 2 instead of the constant if you wish. -- Regards, Tom Ogilvy "Vergel Adriano" wrote: Try it this way: worksheets(1).visible = xlSheetVeryHidden -- Hope that helps. Vergel Adriano "Marek" wrote: Hi, Am trying to hide a worksheet through VBA code. The line of code below ought to do that: worksheets(1).visible = xlveryhidden But it doesn't work!! Anyone with ideas?? -- Many thanks in advance for any assistance Marek |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Marek
It is xlSheetVeryHidden -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Marek" wrote in message ... Hi, Am trying to hide a worksheet through VBA code. The line of code below ought to do that: worksheets(1).visible = xlveryhidden But it doesn't work!! Anyone with ideas?? -- Many thanks in advance for any assistance Marek |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Marek
You can try this one Sub test() Dim rng As Range Dim j As Integer For j = 1 To Sheets.Count Set rng = Nothing On Error Resume Next Set rng = Sheets(j).UsedRange.SpecialCells(xlCellTypeFormula s, 23) On Error GoTo 0 If Not rng Is Nothing Then With rng.Interior .ColorIndex = 36 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With End If Next j End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Marek" wrote in message ... Hi, Am trying to hide a worksheet through VBA code. The line of code below ought to do that: worksheets(1).visible = xlveryhidden But it doesn't work!! Anyone with ideas?? -- Many thanks in advance for any assistance Marek |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oops, wrong thread
-- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Ron de Bruin" wrote in message ... Hi Marek You can try this one Sub test() Dim rng As Range Dim j As Integer For j = 1 To Sheets.Count Set rng = Nothing On Error Resume Next Set rng = Sheets(j).UsedRange.SpecialCells(xlCellTypeFormula s, 23) On Error GoTo 0 If Not rng Is Nothing Then With rng.Interior .ColorIndex = 36 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With End If Next j End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Marek" wrote in message ... Hi, Am trying to hide a worksheet through VBA code. The line of code below ought to do that: worksheets(1).visible = xlveryhidden But it doesn't work!! Anyone with ideas?? -- Many thanks in advance for any assistance Marek |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Come on Ron, don't turn into a newbie:
Demo'd from the immediate window ? xlSheetVeryHidden 2 ? xlVeryHidden 2 shouldn't make any difference. Use 2 instead of the constant if you wish. -- Regards, Tom Ogilvy "Ron de Bruin" wrote: Hi Marek It is xlSheetVeryHidden -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Marek" wrote in message ... Hi, Am trying to hide a worksheet through VBA code. The line of code below ought to do that: worksheets(1).visible = xlveryhidden But it doesn't work!! Anyone with ideas?? -- Many thanks in advance for any assistance Marek |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are correct Tom, both work.
I never use xlVeryHidden Btw: I believe I not see all replies in a few threads today in Windows Mail Also Google show threads with only my reply ??? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Tom Ogilvy" wrote in message ... Come on Ron, don't turn into a newbie: Demo'd from the immediate window ? xlSheetVeryHidden 2 ? xlVeryHidden 2 shouldn't make any difference. Use 2 instead of the constant if you wish. -- Regards, Tom Ogilvy "Ron de Bruin" wrote: Hi Marek It is xlSheetVeryHidden -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Marek" wrote in message ... Hi, Am trying to hide a worksheet through VBA code. The line of code below ought to do that: worksheets(1).visible = xlveryhidden But it doesn't work!! Anyone with ideas?? -- Many thanks in advance for any assistance Marek |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
hiding the worksheet | Excel Discussion (Misc queries) | |||
Hiding a Worksheet | Excel Discussion (Misc queries) | |||
Hiding a Worksheet | Excel Programming | |||
Hiding a Worksheet | Excel Programming | |||
Hiding a Worksheet | Excel Programming |