PC Review


Reply
Thread Tools Rate Thread

Determine Cells(5,4) IN SPITE of hidden rows/columns

 
 
Finny
Guest
Posts: n/a
 
      20th Feb 2007
I have a sheet that toggles hidden values of certain rows and columns
to accommodate the views of data for different users.
Trouble is, in addition to this, some rows are permanently hidden as
once they are too old - but not deleted to keep as reference.
In each of the views, position of the freeze panes is different.
Always in the same position in the eyes of the user, but a different
cell every time an old row becomes hidden.

In a nutshell, with a sheet with unknown hidden rows/columns, how
could you pinpoint position (5,4) according to what you see, not what
is both shown and hidden?

thanks in advance and I hope that is clear enough

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      20th Feb 2007
ActiveWindows.visibleRange(5,4)

assume that rows 1 - 7 are scrolled out of site and row 8 is frozen
further, columns A-C are scrolled out of site and column D is frozen
this puts E9 as the upper left corner of the visible range.

then

? activeWindow.visiblerange.address
$E$9:$Q$46
? activeWindow.VisibleRange(5,4).Address
$H$13

Just note that the (5,4) will be relative to the upper left corner of the
visible range and would be different if user scrolls.

--
Regards,
Tom Ogilvy


"Finny" wrote:

> I have a sheet that toggles hidden values of certain rows and columns
> to accommodate the views of data for different users.
> Trouble is, in addition to this, some rows are permanently hidden as
> once they are too old - but not deleted to keep as reference.
> In each of the views, position of the freeze panes is different.
> Always in the same position in the eyes of the user, but a different
> cell every time an old row becomes hidden.
>
> In a nutshell, with a sheet with unknown hidden rows/columns, how
> could you pinpoint position (5,4) according to what you see, not what
> is both shown and hidden?
>
> thanks in advance and I hope that is clear enough
>
>

 
Reply With Quote
 
Finny
Guest
Posts: n/a
 
      21st Feb 2007
What I'm trying to do in whole is hide certain rows/cols and reset
freeze pane position in two setups and toggle between the two.
I'm getting a 424 on the 3rd line where I set turn off FreezePanes.
I don't understand, I thought with the activate, the object is
qualified. Also, I'm not sure if the way I'm selecting will freeze
panes properly.

Private Sub Order_Click()

Application.ScreenUpdating = False

Workbooks("Purchase Orders
Calendar.xls").Worksheets("Sheet1").Activate
ActiveWindows.FreezePanes = False

With Workbooks("Purchase Orders
Calendar.xls").Worksheets("Sheet1")
If .Columns("AD:AF").Hidden Then
.Columns("AD:AF").Hidden = False
.Rows("1:23").Hidden = False
''''Make selection (ROW) to freeze panes
.VisibleRange(2, 2).Select
.Selection.Row.Select
Else
.Columns("AD:AF").Hidden = True
.Rows("1:23").Hidden = True
''''Make selection (CELL) to freeze panes
.VisibleRange(2, 25).Select
End If
End With

ActiveWindows.FreezePanes = True
Application.ScreenUpdating = True

End Sub

I thought this would be relatively simple, I guess it depends on
experience.

 
Reply With Quote
 
Finny
Guest
Posts: n/a
 
      21st Feb 2007
On Feb 21, 9:34 am, "Finny" <finny...@yahoo.com> wrote:
> What I'm trying to do in whole is hide certain rows/cols and reset
> freeze pane position in two setups and toggle between the two.
> I'm getting a 424 on the 3rd line where I set turn off FreezePanes.
> I don't understand, I thought with the activate, the object is
> qualified. Also, I'm not sure if the way I'm selecting will freeze
> panes properly.
>
> Private Sub Order_Click()
>
> Application.ScreenUpdating = False
>
> Workbooks("Purchase Orders
> Calendar.xls").Worksheets("Sheet1").Activate
> ActiveWindows.FreezePanes = False
>
> With Workbooks("Purchase Orders
> Calendar.xls").Worksheets("Sheet1")
> If .Columns("AD:AF").Hidden Then
> .Columns("AD:AF").Hidden = False
> .Rows("1:23").Hidden = False
> ''''Make selection (ROW) to freeze panes
> .VisibleRange(2, 2).Select
> .Selection.Row.Select
> Else
> .Columns("AD:AF").Hidden = True
> .Rows("1:23").Hidden = True
> ''''Make selection (CELL) to freeze panes
> .VisibleRange(2, 25).Select
> End If
> End With
>
> ActiveWindows.FreezePanes = True
> Application.ScreenUpdating = True
>
> End Sub
>
> I thought this would be relatively simple, I guess it depends on
> experience.


btw, thanks for the reply Tom.

 
Reply With Quote
 
Finny
Guest
Posts: n/a
 
      22nd Feb 2007
bump

 
Reply With Quote
 
Finny
Guest
Posts: n/a
 
      23rd Feb 2007
On Feb 22, 2:50 pm, "Finny" <finny...@yahoo.com> wrote:
> bump


no thoughts?

 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      25th Feb 2007
where you have

ActiveWindows.FreezePanes = False

Use ActiveWindow without the "s"

same with
ActiveWindows.FreezePanes = True

change to:

ActiveWindow.FreezePanes = True


--
Regards,
Tom Ogilvy


"Finny" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Feb 22, 2:50 pm, "Finny" <finny...@yahoo.com> wrote:
>> bump

>
> no thoughts?
>



 
Reply With Quote
 
Finny
Guest
Posts: n/a
 
      1st Mar 2007
On Feb 25, 2:47 pm, "Tom Ogilvy" <twogi...@msn.com> wrote:
> where you have
>
> ActiveWindows.FreezePanes = False
>
> Use ActiveWindow without the "s"
>
> same with
> ActiveWindows.FreezePanes = True
>
> change to:
>
> ActiveWindow.FreezePanes = True
>
> --
> Regards,
> Tom Ogilvy
>
> "Finny" <finny...@yahoo.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > On Feb 22, 2:50 pm, "Finny" <finny...@yahoo.com> wrote:
> >> bump

>
> > no thoughts?


That did the trick Tom, thanks!

 
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
how do i paste rows/columns avoiding hidden rows/columns perezli Microsoft Excel Misc 1 30th Jan 2009 03:58 PM
Hidden rows/columns expand when referencing cells? tink Microsoft Excel Worksheet Functions 1 9th Oct 2008 08:48 PM
Determine Which Columns Are Hidden in VBA nospamkam@wowway.com Microsoft Access 1 7th Mar 2008 08:46 PM
Determine Which Columns Are Hidden with VBA Keith Microsoft Excel Discussion 2 7th Mar 2008 06:59 PM
How to copy cells without copying the hidden rows and columns? =?Utf-8?B?dHNld3QyMw==?= Microsoft Excel Misc 1 29th Oct 2004 07:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:45 PM.