Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
How do you hide/un-hide the grid lines ED Excel Discussion (Misc queries) 4 February 26th 13 03:22 PM
How to hide infromation in Excel? Sarah Excel Worksheet Functions 3 April 21st 10 12:01 PM
Want to Hide columns in spreadsheet but NOT hide data in chart. KrispyData Charts and Charting in Excel 1 March 20th 09 04:45 PM
How do I hide hide #REF! in Excel PerryK Excel Discussion (Misc queries) 3 February 27th 09 02:59 PM
How do I hide a worksheet in Excel and use a password to un-hide . Dchung Excel Discussion (Misc queries) 3 December 2nd 04 06:24 AM


All times are GMT +1. The time now is 04:22 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"