Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Excel row in VBA
Help! I'm using Excel 97 and I am trying to hide a
spreadsheet row using VBA. This code is not working: activesheet.Rows("28").Hidden = True The message is 'unable to set the Hidden property of the Range class.' The sheet is not protected. Any suggestions? Rich |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Excel row in VBA
How are you running the code?
If it's from a control from the control toolbox toolbar, try adding: activecell.activate near the top of your code. (or change the .takefocusonclick to false (if the control has that property.)) RichC wrote: Help! I'm using Excel 97 and I am trying to hide a spreadsheet row using VBA. This code is not working: activesheet.Rows("28").Hidden = True The message is 'unable to set the Hidden property of the Range class.' The sheet is not protected. Any suggestions? Rich -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Excel row in VBA
I use something like
activecell.entirerow.hidden = true or Rows("28").EntireRow.Hidden = True Either should work. Rodney. "Dave Peterson" wrote in message ... How are you running the code? If it's from a control from the control toolbox toolbar, try adding: activecell.activate near the top of your code. (or change the .takefocusonclick to false (if the control has that property.)) RichC wrote: Help! I'm using Excel 97 and I am trying to hide a spreadsheet row using VBA. This code is not working: activesheet.Rows("28").Hidden = True The message is 'unable to set the Hidden property of the Range class.' The sheet is not protected. Any suggestions? Rich -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Excel row in VBA
Not if the problem is as Dave Peterson suggests.
-- Regards, Tom Ogilvy "Rodney Baker" wrote in message ... I use something like activecell.entirerow.hidden = true or Rows("28").EntireRow.Hidden = True Either should work. Rodney. "Dave Peterson" wrote in message ... How are you running the code? If it's from a control from the control toolbox toolbar, try adding: activecell.activate near the top of your code. (or change the .takefocusonclick to false (if the control has that property.)) RichC wrote: Help! I'm using Excel 97 and I am trying to hide a spreadsheet row using VBA. This code is not working: activesheet.Rows("28").Hidden = True The message is 'unable to set the Hidden property of the Range class.' The sheet is not protected. Any suggestions? Rich -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you hide/un-hide the grid lines | Excel Discussion (Misc queries) | |||
How to hide infromation in Excel? | Excel Worksheet Functions | |||
Want to Hide columns in spreadsheet but NOT hide data in chart. | Charts and Charting in Excel | |||
How do I hide hide #REF! in Excel | Excel Discussion (Misc queries) | |||
How do I hide a worksheet in Excel and use a password to un-hide . | Excel Discussion (Misc queries) |