Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Basic VBA Question with Array

I have a workbook with a dozen or so sheets. I'd like to add code to my
existing macro to state when the sheet tab is clicked, the sheet displays at
the bottom of the page, not the top. The reason for this is each of the
sheets has a total at the bottom of the page and I'd like to be able to view
that immediately. I can't specific a specific cell because I download a
report each day so the last row of each sheet varies each day. I'm thinking
this is simple, but I haven't been able to figure it out yet. Thanks for your
help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Basic VBA Question with Array

I'm not sure you will find it simple to add code to your existing macro to
get what you want but you could add code to the workbook that would do what
I think you want.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim intRowCnt As Integer
intRowCnt = ActiveSheet.UsedRange.Rows.Count
ActiveSheet.Cells(intRowCnt, 1).Select
End Sub



Steve Yandl



"SITCFanTN" wrote in message
...
I have a workbook with a dozen or so sheets. I'd like to add code to my
existing macro to state when the sheet tab is clicked, the sheet displays
at
the bottom of the page, not the top. The reason for this is each of the
sheets has a total at the bottom of the page and I'd like to be able to
view
that immediately. I can't specific a specific cell because I download a
report each day so the last row of each sheet varies each day. I'm
thinking
this is simple, but I haven't been able to figure it out yet. Thanks for
your
help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Basic VBA Question with Array


try
Cells.SpecialCells(xlCellTypeLastCell).Activate


--
lcoreyl
------------------------------------------------------------------------
lcoreyl's Profile: http://www.excelforum.com/member.php...fo&userid=2042
View this thread: http://www.excelforum.com/showthread...hreadid=557591

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Basic VBA Question with Array

THanks Steve, this works great, I added it to the bottom of each sheets page
setup sub. I appreciate your help, thank you and have a great holiday.

"Steve Yandl" wrote:

I'm not sure you will find it simple to add code to your existing macro to
get what you want but you could add code to the workbook that would do what
I think you want.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim intRowCnt As Integer
intRowCnt = ActiveSheet.UsedRange.Rows.Count
ActiveSheet.Cells(intRowCnt, 1).Select
End Sub



Steve Yandl



"SITCFanTN" wrote in message
...
I have a workbook with a dozen or so sheets. I'd like to add code to my
existing macro to state when the sheet tab is clicked, the sheet displays
at
the bottom of the page, not the top. The reason for this is each of the
sheets has a total at the bottom of the page and I'd like to be able to
view
that immediately. I can't specific a specific cell because I download a
report each day so the last row of each sheet varies each day. I'm
thinking
this is simple, but I haven't been able to figure it out yet. Thanks for
your
help.




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
Basic question...sorry jen the runner Excel Worksheet Functions 11 September 18th 07 12:12 AM
Basic Array Question Annabelle Excel Discussion (Misc queries) 2 August 29th 05 10:50 PM
How do I use an array function in Visual basic .NET? cirrus Excel Programming 1 October 22nd 04 04:23 PM
basic variant to array conversion Jeff Sward Excel Programming 1 January 26th 04 07:59 PM
excel vba array basic operations Gabriel[_3_] Excel Programming 2 December 14th 03 05:32 PM


All times are GMT +1. The time now is 09:56 PM.

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

About Us

"It's about Microsoft Excel"