Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Can't set the Entirerow.Hidden property.

This is weird, and I can't figure out why it won't work.

I have a worksheet that basically has a series of yes/no fields on it,
and when a user changes the fields, certain ranges hide or unhide. It
uses a couple of class modules and the worksheet_change event.

Now, I took one of the areas that's supposed to expand and collapse
and replaced the Yes/No trigger with a formula that chooses "Yes" or
"No" based on other conditions in the sheet. To keep the range
working correctly, I added code to check whether the conditions have
changed. If they change, the sheet tells the class to do its thing
and hide or unhide the range. This worked for a while.

Now, for some reason, everything seems to be firing properly, but when
that range and only that range gets to the point where it hits:

If .hidden then .hidden=false

or:

if .hidden=false then .hidden=true

it simply ignores it. Just on that range.

What's really funny (oh, it's fricken HILARIOUS) is that this object
is set up to basically go through and set all the hidden properties
every time certain cells change, so if I change the yes/no on any of
the other areas, this range hides or unhides just fine. It's only
when I try to trigger it based on the conditions that it totally fails
to work. But it's recognizing the conditions and correctly triggering
the hide/unhide procedure, so I don't have a clue what the problem is
here.

Therefore, I offer a prayer to the Excel Gods. Just for some new
ideas, naturally, because this is a messy problem and I don't expect
someone to know exactly what's wrong based on my poor and partial
description. Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Can't set the Entirerow.Hidden property.

Hi
Do you have any comments or other shapes/buttons in this range? If you
do, edit them and look for format comment... or format object etc from
the right click menu. Click on "Move and Size with cells" - I'm
guessing "Do not move and size with cells" is clicked on. Columns and
rows won't hide if the object in them can't.
Banged my head on this one for many weeks once and it nearly broke my
heart trying to find out the problem!
regards
Paul

On Mar 21, 12:43 pm, "Jeremy" wrote:
This is weird, and I can't figure out why it won't work.

I have a worksheet that basically has a series of yes/no fields on it,
and when a user changes the fields, certain ranges hide or unhide. It
uses a couple of class modules and the worksheet_change event.

Now, I took one of the areas that's supposed to expand and collapse
and replaced the Yes/No trigger with a formula that chooses "Yes" or
"No" based on other conditions in the sheet. To keep the range
working correctly, I added code to check whether the conditions have
changed. If they change, the sheet tells the class to do its thing
and hide or unhide the range. This worked for a while.

Now, for some reason, everything seems to be firing properly, but when
that range and only that range gets to the point where it hits:

If .hidden then .hidden=false

or:

if .hidden=false then .hidden=true

it simply ignores it. Just on that range.

What's really funny (oh, it's fricken HILARIOUS) is that this object
is set up to basically go through and set all the hidden properties
every time certain cells change, so if I change the yes/no on any of
the other areas, this range hides or unhides just fine. It's only
when I try to trigger it based on the conditions that it totally fails
to work. But it's recognizing the conditions and correctly triggering
the hide/unhide procedure, so I don't have a clue what the problem is
here.

Therefore, I offer a prayer to the Excel Gods. Just for some new
ideas, naturally, because this is a messy problem and I don't expect
someone to know exactly what's wrong based on my poor and partial
description. Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Can't set the Entirerow.Hidden property.

I didn't know about that, but I'll keep it in mind for future
reference. Unfortunately, in this case, everything seems perfectly
normal, even to the point that activating the hide/unhide procedure
anywhere else in the sheet, or even typing in "yes" or "no" in the
problem range, will hide or unhide it just fine. It seems like it
ignores the command to hide only when I call it from the code that
checks whether those other values change, and I even call it in
exactly the same way as I do elsewhere, but in this case, it won't
work for no apparent reason.

Does anyone know what else might cause VBA to ignore a change to the
Hidden property without returning an error?

On Mar 21, 9:00 am, wrote:
Hi
Do you have any comments or other shapes/buttons in this range? If you
do, edit them and look for format comment... or format object etc from
the right click menu. Click on "Move and Size with cells" - I'm
guessing "Do not move and size with cells" is clicked on. Columns and
rows won't hide if the object in them can't.
Banged my head on this one for many weeks once and it nearly broke my
heart trying to find out the problem!
regards
Paul

On Mar 21, 12:43 pm, "Jeremy" wrote:



This is weird, and I can't figure out why it won't work.


I have a worksheet that basically has a series of yes/no fields on it,
and when a user changes the fields, certain ranges hide or unhide. It
uses a couple of class modules and the worksheet_change event.


Now, I took one of the areas that's supposed to expand and collapse
and replaced the Yes/No trigger with a formula that chooses "Yes" or
"No" based on other conditions in the sheet. To keep the range
working correctly, I added code to check whether the conditions have
changed. If they change, the sheet tells the class to do its thing
and hide or unhide the range. This worked for a while.


Now, for some reason, everything seems to be firing properly, but when
that range and only that range gets to the point where it hits:


If .hidden then .hidden=false


or:


if .hidden=false then .hidden=true


it simply ignores it. Just on that range.


What's really funny (oh, it's fricken HILARIOUS) is that this object
is set up to basically go through and set all the hidden properties
every time certain cells change, so if I change the yes/no on any of
the other areas, this range hides or unhides just fine. It's only
when I try to trigger it based on the conditions that it totally fails
to work. But it's recognizing the conditions and correctly triggering
the hide/unhide procedure, so I don't have a clue what the problem is
here.


Therefore, I offer a prayer to the Excel Gods. Just for some new
ideas, naturally, because this is a messy problem and I don't expect
someone to know exactly what's wrong based on my poor and partial
description. Thanks!- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Can't set the Entirerow.Hidden property.

We would have to see the code I think.
regards
Paul

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
Macros cells.EntireRow.Hidden = True and Range.Sort are stopping Adrian Excel Programming 0 March 22nd 06 01:59 AM
Unable to set Hidden Property LAF[_7_] Excel Programming 2 August 24th 05 11:36 AM
Hidden property not working when deleting a row? Upanisad Excel Programming 5 August 10th 05 07:40 PM
unable to set hidden property davegb Excel Programming 2 March 22nd 05 12:03 AM
EntireRow.Hidden Jonas Haettner Excel Programming 1 October 24th 03 09:19 AM


All times are GMT +1. The time now is 01:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"