PC Review


Reply
Thread Tools Rate Thread

VBA using an image as a toggle switch

 
 
DonH
Guest
Posts: n/a
 
      9th Nov 2006
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
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
Thanks Bob :-) That worked fantastically. I really am going to have to
learn VBA

Many thanks

DonH


"Bob Phillips" <(E-Mail Removed)> wrote in message
news:eUbkeO%(E-Mail Removed)...
> 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
 
Dana DeLouis
Guest
Posts: n/a
 
      9th Nov 2006
Just an additional idea...

With Range("25:75,98:148,244:294,317:367").EntireRow
.Hidden = Not .Hidden
End With

--
Dana DeLouis
Windows XP & Office 2003


"DonH" <(E-Mail Removed)> wrote in message
news:jqD4h.12835$(E-Mail Removed)...
> Thanks Bob :-) That worked fantastically. I really am going to have to
> learn VBA
>
> Many thanks
>
> DonH
>
>
> "Bob Phillips" <(E-Mail Removed)> wrote in message
> news:eUbkeO%(E-Mail Removed)...
>> 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
 
 
 
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
Bold Toggle Switch =?Utf-8?B?VGVycnk=?= Microsoft Word Document Management 1 30th Oct 2007 06:51 PM
Toggle Switch =?Utf-8?B?QmVlcCBCZWVw?= Microsoft Excel Programming 7 13th Jul 2007 08:10 PM
Linking a cell to a toggle switch Brisbane Rob Microsoft Excel Programming 2 29th Oct 2005 01:41 AM
Toggle on/off switch for x-y graph Brad Microsoft Excel Charting 4 19th Aug 2005 04:08 AM
Powerpoint OSX Toggle or Switch James R Microsoft Powerpoint 3 9th Oct 2003 09:39 PM


Features
 

Advertising
 

Newsgroups
 


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