Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I got a type mismatch run-time error on the line to set the range.
I just want to hide columns 0 - Z or columns 16-26. Can you help me set the range right? thanks, Sub HideXtraCells() Dim rng As Range ' HideCells Macro Set rng = Columns("0:Z") rng.EntireColumn.Hidden = True End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Janis,
Set rng = Columns("0:Z") Replace 0 (zero) with O (upper case letter O) --- Regards, Norman "Janis" wrote in message ... I got a type mismatch run-time error on the line to set the range. I just want to hide columns 0 - Z or columns 16-26. Can you help me set the range right? thanks, Sub HideXtraCells() Dim rng As Range ' HideCells Macro Set rng = Columns("0:Z") rng.EntireColumn.Hidden = True End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I got the answer, thanks anyways.
Sub HideXtraCells() ' HideCells Macro Columns("O:Z").EntireColumn.Hidden = True End Sub "Janis" wrote: I got a type mismatch run-time error on the line to set the range. I just want to hide columns 0 - Z or columns 16-26. Can you help me set the range right? thanks, Sub HideXtraCells() Dim rng As Range ' HideCells Macro Set rng = Columns("0:Z") rng.EntireColumn.Hidden = True End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are right thanks, I still didn't have the answer but almost. i wondered
why it crashed. "Norman Jones" wrote: Hi Janis, Set rng = Columns("0:Z") Replace 0 (zero) with O (upper case letter O) --- Regards, Norman "Janis" wrote in message ... I got a type mismatch run-time error on the line to set the range. I just want to hide columns 0 - Z or columns 16-26. Can you help me set the range right? thanks, Sub HideXtraCells() Dim rng As Range ' HideCells Macro Set rng = Columns("0:Z") rng.EntireColumn.Hidden = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
xpath error? Runtime Error 13 type mismatch | Excel Discussion (Misc queries) | |||
xpath error? Runtime Error 13 type mismatch | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming | |||
Unknown where is the problem on the Runtime error - Automation error | Excel Programming |