Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Basic question...sorry | Excel Worksheet Functions | |||
Basic Array Question | Excel Discussion (Misc queries) | |||
How do I use an array function in Visual basic .NET? | Excel Programming | |||
basic variant to array conversion | Excel Programming | |||
excel vba array basic operations | Excel Programming |