PC Review


Reply
Thread Tools Rate Thread

Control a worksheet w/o activating

 
 
Cerberus
Guest
Posts: n/a
 
      13th Aug 2009
I have a worksheet ("Cut") that has a hide macro associated with a worksheet
activation. I would like to unhide that page when I activate another
worksheet ("Order").

I have tried:

Private Sub Worksheet_Activate()
Sheets ("Cut")
Cells.Select
Selection.EntireRow.Hidden = False
End Sub

But obviously that is not the answer. Any ideas? Thanks in advance for
your assistance.
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      13th Aug 2009
Private Sub Worksheet_Activate()
Sheets("Cut").Visible = True
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Cerberus" <(E-Mail Removed)> wrote in message
news:E4425156-F751-40A2-A6E5-(E-Mail Removed)...
>I have a worksheet ("Cut") that has a hide macro associated with a
>worksheet
> activation. I would like to unhide that page when I activate another
> worksheet ("Order").
>
> I have tried:
>
> Private Sub Worksheet_Activate()
> Sheets ("Cut")
> Cells.Select
> Selection.EntireRow.Hidden = False
> End Sub
>
> But obviously that is not the answer. Any ideas? Thanks in advance for
> your assistance.


 
Reply With Quote
 
Jayson
Guest
Posts: n/a
 
      13th Aug 2009
Do you mean unhide rows on "Cut", or unhide the entire sheet?

Private Sub Worksheet_Activate()
'To unhide the sheet
Sheets("Cut").Visible = xlSheetVisible
'To unhide rows - adjust the range to include the rows you want unhidden
Sheets("Cut").range("A1:A5").entirerow.hidden = false
End Sub

--
---
http://excelninja.blogspot.com


"Cerberus" wrote:

> I have a worksheet ("Cut") that has a hide macro associated with a worksheet
> activation. I would like to unhide that page when I activate another
> worksheet ("Order").
>
> I have tried:
>
> Private Sub Worksheet_Activate()
> Sheets ("Cut")
> Cells.Select
> Selection.EntireRow.Hidden = False
> End Sub
>
> But obviously that is not the answer. Any ideas? Thanks in advance for
> your assistance.

 
Reply With Quote
 
Cerberus
Guest
Posts: n/a
 
      13th Aug 2009
Unhide rows on "Cut" but not leave the "Order" worksheet.

"Jayson" wrote:

> Do you mean unhide rows on "Cut", or unhide the entire sheet?
>
> Private Sub Worksheet_Activate()
> 'To unhide the sheet
> Sheets("Cut").Visible = xlSheetVisible
> 'To unhide rows - adjust the range to include the rows you want unhidden
> Sheets("Cut").range("A1:A5").entirerow.hidden = false
> End Sub
>
> --
> ---
> http://excelninja.blogspot.com
>
>
> "Cerberus" wrote:
>
> > I have a worksheet ("Cut") that has a hide macro associated with a worksheet
> > activation. I would like to unhide that page when I activate another
> > worksheet ("Order").
> >
> > I have tried:
> >
> > Private Sub Worksheet_Activate()
> > Sheets ("Cut")
> > Cells.Select
> > Selection.EntireRow.Hidden = False
> > End Sub
> >
> > But obviously that is not the answer. Any ideas? Thanks in advance for
> > your assistance.

 
Reply With Quote
 
Jayson
Guest
Posts: n/a
 
      13th Aug 2009
This should do it. Place this in the "Order" worksheet code.

Private Sub Worksheet_Activate()
'To unhide rows - adjust the range to include the rows you want unhidden
Sheets("Cut").Range("A1:A5").EntireRow.Hidden = False
End Sub

--
---
http://excelninja.blogspot.com


"Cerberus" wrote:

> Unhide rows on "Cut" but not leave the "Order" worksheet.
>
> "Jayson" wrote:
>
> > Do you mean unhide rows on "Cut", or unhide the entire sheet?
> >
> > Private Sub Worksheet_Activate()
> > 'To unhide the sheet
> > Sheets("Cut").Visible = xlSheetVisible
> > 'To unhide rows - adjust the range to include the rows you want unhidden
> > Sheets("Cut").range("A1:A5").entirerow.hidden = false
> > End Sub
> >
> > --
> > ---
> > http://excelninja.blogspot.com
> >
> >
> > "Cerberus" wrote:
> >
> > > I have a worksheet ("Cut") that has a hide macro associated with a worksheet
> > > activation. I would like to unhide that page when I activate another
> > > worksheet ("Order").
> > >
> > > I have tried:
> > >
> > > Private Sub Worksheet_Activate()
> > > Sheets ("Cut")
> > > Cells.Select
> > > Selection.EntireRow.Hidden = False
> > > End Sub
> > >
> > > But obviously that is not the answer. Any ideas? Thanks in advance for
> > > your assistance.

 
Reply With Quote
 
Cerberus
Guest
Posts: n/a
 
      13th Aug 2009
Worked like a charm. Thank you for your help on this.

"Jayson" wrote:

> This should do it. Place this in the "Order" worksheet code.
>
> Private Sub Worksheet_Activate()
> 'To unhide rows - adjust the range to include the rows you want unhidden
> Sheets("Cut").Range("A1:A5").EntireRow.Hidden = False
> End Sub
>
> --
> ---
> http://excelninja.blogspot.com
>
>
> "Cerberus" wrote:
>
> > Unhide rows on "Cut" but not leave the "Order" worksheet.
> >
> > "Jayson" wrote:
> >
> > > Do you mean unhide rows on "Cut", or unhide the entire sheet?
> > >
> > > Private Sub Worksheet_Activate()
> > > 'To unhide the sheet
> > > Sheets("Cut").Visible = xlSheetVisible
> > > 'To unhide rows - adjust the range to include the rows you want unhidden
> > > Sheets("Cut").range("A1:A5").entirerow.hidden = false
> > > End Sub
> > >
> > > --
> > > ---
> > > http://excelninja.blogspot.com
> > >
> > >
> > > "Cerberus" wrote:
> > >
> > > > I have a worksheet ("Cut") that has a hide macro associated with a worksheet
> > > > activation. I would like to unhide that page when I activate another
> > > > worksheet ("Order").
> > > >
> > > > I have tried:
> > > >
> > > > Private Sub Worksheet_Activate()
> > > > Sheets ("Cut")
> > > > Cells.Select
> > > > Selection.EntireRow.Hidden = False
> > > > End Sub
> > > >
> > > > But obviously that is not the answer. Any ideas? Thanks in advance for
> > > > your assistance.

 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      13th Aug 2009
Sheets use the "Visible" property and rows use the "Hidden" property.
Visible can be used two ways with a sheet:

Object.Visible = (xlSheetVisible or xlSheetHidden)
Object.Vixible = (True or False)

More details in the VBA help file under Visible Property



"Cerberus" <(E-Mail Removed)> wrote in message
news:2FD030C5-DCA3-4395-BE0C-(E-Mail Removed)...
> Unhide rows on "Cut" but not leave the "Order" worksheet.
>
> "Jayson" wrote:
>
>> Do you mean unhide rows on "Cut", or unhide the entire sheet?
>>
>> Private Sub Worksheet_Activate()
>> 'To unhide the sheet
>> Sheets("Cut").Visible = xlSheetVisible
>> 'To unhide rows - adjust the range to include the rows you want
>> unhidden
>> Sheets("Cut").range("A1:A5").entirerow.hidden = false
>> End Sub
>>
>> --
>> ---
>> http://excelninja.blogspot.com
>>
>>
>> "Cerberus" wrote:
>>
>> > I have a worksheet ("Cut") that has a hide macro associated with a
>> > worksheet
>> > activation. I would like to unhide that page when I activate another
>> > worksheet ("Order").
>> >
>> > I have tried:
>> >
>> > Private Sub Worksheet_Activate()
>> > Sheets ("Cut")
>> > Cells.Select
>> > Selection.EntireRow.Hidden = False
>> > End Sub
>> >
>> > But obviously that is not the answer. Any ideas? Thanks in advance
>> > for
>> > your assistance.



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      13th Aug 2009

sheets("Cut").rows.hidden=false

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Cerberus" <(E-Mail Removed)> wrote in message
news:2FD030C5-DCA3-4395-BE0C-(E-Mail Removed)...
> Unhide rows on "Cut" but not leave the "Order" worksheet.
>
> "Jayson" wrote:
>
>> Do you mean unhide rows on "Cut", or unhide the entire sheet?
>>
>> Private Sub Worksheet_Activate()
>> 'To unhide the sheet
>> Sheets("Cut").Visible = xlSheetVisible
>> 'To unhide rows - adjust the range to include the rows you want
>> unhidden
>> Sheets("Cut").range("A1:A5").entirerow.hidden = false
>> End Sub
>>
>> --
>> ---
>> http://excelninja.blogspot.com
>>
>>
>> "Cerberus" wrote:
>>
>> > I have a worksheet ("Cut") that has a hide macro associated with a
>> > worksheet
>> > activation. I would like to unhide that page when I activate another
>> > worksheet ("Order").
>> >
>> > I have tried:
>> >
>> > Private Sub Worksheet_Activate()
>> > Sheets ("Cut")
>> > Cells.Select
>> > Selection.EntireRow.Hidden = False
>> > End Sub
>> >
>> > But obviously that is not the answer. Any ideas? Thanks in advance
>> > for
>> > your assistance.


 
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
Re: Activating a Worksheet? Bernie Deitrick Microsoft Excel Misc 1 8th Dec 2006 05:15 PM
Worksheet activating JamesM Microsoft Excel Programming 0 28th Sep 2004 04:34 PM
Worksheet activating JamesM Microsoft Excel Programming 1 28th Sep 2004 04:09 PM
Activating a worksheet DJH Microsoft Excel Programming 2 10th Aug 2004 04:20 PM
Activating a worksheet =?Utf-8?B?SmVmZiBOYXZhcnJl?= Microsoft Excel Misc 2 25th May 2004 12:10 AM


Features
 

Advertising
 

Newsgroups
 


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