PC Review


Reply
Thread Tools Rate Thread

Further Show Hide Problem with VBA

 
 
DonH
Guest
Posts: n/a
 
      9th Nov 2006
Hi again!

Bob kindly gave me a suggestion for using VBA to show /hide using a single
button. This worked fine until I decided I wanted to have another custom
area off to the side.

The problem being that when I try to return from this third view not all
rows columns are showing. I thought I might get round this by including an
unhide for all rows and columns to create a normal view to go from but then
the toggle views don't seem to do anything.

Any help greatly appreciated

DonH




Call Unl
Application.ScreenUpdating = False
Rows("25:75").EntireRow.Hidden = Not Rows("25:75").EntireRow.Hidden
Rows("98:148").EntireRow.Hidden = Not Rows("98:148").EntireRow.Hidden
Rows("244:294").EntireRow.Hidden = Not Rows("244:294").EntireRow.Hidden
Rows("317:367").EntireRow.Hidden = Not Rows("317:367").EntireRow.Hidden
Range("K4").Select
Calculate
Call Pro


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"DonH" <(E-Mail Removed)> wrote in message
news:WIB4h.25197$(E-Mail Removed)...
> Hi hope you can help.
>
> I know next to nothing about VBA and have adapted code below from stuff I
> had.
>
> I simply want to show hide portions of my page to cut down on screen
> clutter/information overload.
>
> I have assigned my macro to a screen image but was wondering if I could

have
> a hide and unhide under the same button.
>
> Any help would be much appreciated
>
>
>
> Call Unl
> Application.ScreenUpdating = False
> Rows("25:75").EntireRow.Hidden = True
> Rows("98:148").EntireRow.Hidden = True
> Rows("171:221").EntireRow.Hidden = True
> Rows("244:294").EntireRow.Hidden = True
> Rows("317:367").EntireRow.Hidden = True
> Range("K4").Select
> Calculate
> Call Pro
>
>
> DonH
>
>






 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      9th Nov 2006
Why does your unhide all not work?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"DonH" <(E-Mail Removed)> wrote in message
news:XlF4h.20270$(E-Mail Removed)...
> Hi again!
>
> Bob kindly gave me a suggestion for using VBA to show /hide using a single
> button. This worked fine until I decided I wanted to have another custom
> area off to the side.
>
> The problem being that when I try to return from this third view not all
> rows columns are showing. I thought I might get round this by including

an
> unhide for all rows and columns to create a normal view to go from but

then
> the toggle views don't seem to do anything.
>
> Any help greatly appreciated
>
> DonH
>
>
>
>
> Call Unl
> Application.ScreenUpdating = False
> Rows("25:75").EntireRow.Hidden = Not Rows("25:75").EntireRow.Hidden
> Rows("98:148").EntireRow.Hidden = Not Rows("98:148").EntireRow.Hidden
> Rows("244:294").EntireRow.Hidden = Not Rows("244:294").EntireRow.Hidden
> Rows("317:367").EntireRow.Hidden = Not Rows("317:367").EntireRow.Hidden
> Range("K4").Select
> Calculate
> Call Pro
>
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "DonH" <(E-Mail Removed)> wrote in message
> news:WIB4h.25197$(E-Mail Removed)...
> > Hi hope you can help.
> >
> > I know next to nothing about VBA and have adapted code below from stuff

I
> > had.
> >
> > I simply want to show hide portions of my page to cut down on screen
> > clutter/information overload.
> >
> > I have assigned my macro to a screen image but was wondering if I could

> have
> > a hide and unhide under the same button.
> >
> > Any help would be much appreciated
> >
> >
> >
> > Call Unl
> > Application.ScreenUpdating = False
> > Rows("25:75").EntireRow.Hidden = True
> > Rows("98:148").EntireRow.Hidden = True
> > Rows("171:221").EntireRow.Hidden = True
> > Rows("244:294").EntireRow.Hidden = True
> > Rows("317:367").EntireRow.Hidden = True
> > Range("K4").Select
> > Calculate
> > Call Pro
> >
> >
> > DonH
> >
> >

>
>
>
>
>



 
Reply With Quote
 
DonH
Guest
Posts: n/a
 
      9th Nov 2006
Sorry to be thick :-)

The new (third area) I created is

Columns("C:BH").EntireColumn.Hidden = False
Rows("4:367").EntireRow.Hidden = False
Columns("E:BA").EntireColumn.Hidden = True
Rows("4").EntireRow.Hidden = True
Rows("19:77").EntireRow.Hidden = True
Rows("91:150").EntireRow.Hidden = True
Rows("166:223").EntireRow.Hidden = True
Rows("238:296").EntireRow.Hidden = True
Rows("310:367").EntireRow.Hidden = True

When I go to

Rows("25:75").EntireRow.Hidden = Not Rows("25:75").EntireRow.Hidden
Rows("98:148").EntireRow.Hidden = Not Rows("98:148").EntireRow.Hidden
Rows("244:294").EntireRow.Hidden = Not Rows("244:294").EntireRow.Hidden
Rows("317:367").EntireRow.Hidden = Not Rows("317:367").EntireRow.Hidden

Cell info is missing so I tried to insert

Columns("C:BH").EntireColumn.Hidden = False
Rows("4:367").EntireRow.Hidden = False

to unhide the rows columns I need to see

Columns("C:BH").EntireColumn.Hidden = False
Rows("4:367").EntireRow.Hidden = False
Rows("25:75").EntireRow.Hidden = Not Rows("25:75").EntireRow.Hidden
Rows("98:148").EntireRow.Hidden = Not Rows("98:148").EntireRow.Hidden
Rows("244:294").EntireRow.Hidden = Not Rows("244:294").EntireRow.Hidden
Rows("317:367").EntireRow.Hidden = Not Rows("317:367").EntireRow.Hidden

When I rem out
Columns("C:BH").EntireColumn.Hidden = False
Rows("4:367").EntireRow.Hidden = False
the switching works fine until I go to the new view then when I go back
columns are missing and with the Rem removed the sitching gets stuck.

I'm getting very confused :-(

DonH



"Bob Phillips" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Why does your unhide all not work?
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "DonH" <(E-Mail Removed)> wrote in message
> news:XlF4h.20270$(E-Mail Removed)...
>> Hi again!
>>
>> Bob kindly gave me a suggestion for using VBA to show /hide using a
>> single
>> button. This worked fine until I decided I wanted to have another custom
>> area off to the side.
>>
>> The problem being that when I try to return from this third view not all
>> rows columns are showing. I thought I might get round this by including

> an
>> unhide for all rows and columns to create a normal view to go from but

> then
>> the toggle views don't seem to do anything.
>>
>> Any help greatly appreciated
>>
>> DonH
>>
>>
>>
>>
>> Call Unl
>> Application.ScreenUpdating = False
>> Rows("25:75").EntireRow.Hidden = Not Rows("25:75").EntireRow.Hidden
>> Rows("98:148").EntireRow.Hidden = Not Rows("98:148").EntireRow.Hidden
>> Rows("244:294").EntireRow.Hidden = Not Rows("244:294").EntireRow.Hidden
>> Rows("317:367").EntireRow.Hidden = Not Rows("317:367").EntireRow.Hidden
>> Range("K4").Select
>> Calculate
>> Call Pro
>>
>>
>> --
>> HTH
>>
>> Bob Phillips
>>
>> (replace somewhere in email address with gmail if mailing direct)
>>
>> "DonH" <(E-Mail Removed)> wrote in message
>> news:WIB4h.25197$(E-Mail Removed)...
>> > Hi hope you can help.
>> >
>> > I know next to nothing about VBA and have adapted code below from stuff

> I
>> > had.
>> >
>> > I simply want to show hide portions of my page to cut down on screen
>> > clutter/information overload.
>> >
>> > I have assigned my macro to a screen image but was wondering if I could

>> have
>> > a hide and unhide under the same button.
>> >
>> > Any help would be much appreciated
>> >
>> >
>> >
>> > Call Unl
>> > Application.ScreenUpdating = False
>> > Rows("25:75").EntireRow.Hidden = True
>> > Rows("98:148").EntireRow.Hidden = True
>> > Rows("171:221").EntireRow.Hidden = True
>> > Rows("244:294").EntireRow.Hidden = True
>> > Rows("317:367").EntireRow.Hidden = True
>> > Range("K4").Select
>> > Calculate
>> > Call Pro
>> >
>> >
>> > DonH
>> >
>> >

>>
>>
>>
>>
>>

>
>



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      9th Nov 2006

"DonH" <(E-Mail Removed)> wrote in message
news:NPG4h.7314$(E-Mail Removed)...

> I'm getting very confused :-(



You and me both Don.

I am sorry, but I just don't get what the problem is that you are
experiencing.

You say cell info is missing, do you mean that it is hidden? When you hide
your rows, what is getting hidden that you don't want to be?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform show / hide problem brookly Microsoft Excel Programming 6 18th Mar 2006 10:48 PM
problem with show/hide =?Utf-8?B?U2FucyBOb20=?= Microsoft Word Document Management 1 16th Dec 2005 05:35 PM
Show/Hide Problem =?Utf-8?B?SmFjaw==?= Microsoft Word Document Management 1 16th Jun 2005 12:24 AM
Form Hide() / Show() problem =?Utf-8?B?UGlua2VzaA==?= Microsoft Dot NET Compact Framework 3 17th Mar 2004 08:04 PM
Show & Hide field problem Kaye Microsoft Access Queries 2 21st Aug 2003 01:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:47 AM.