Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have an Excel VBA app and I need automatically scroll to the top left (cell A1) when each worksheet is selected and activated. I tried using the Select, Activate and Show methods for the range in the Worksheet_Activate sub but they didn't work. Any ideas on a simple technique to do so? Thanks, God bless Van |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Where did you put the code, and how did you write it? Sounds like the idea
should work; you would need to put the code in each worksheet's module, though, to get it to work for every sheet. This code should work: Private Sub Worksheet_Activate() Range("A1").Select End Sub "VanS" wrote: Hello, I have an Excel VBA app and I need automatically scroll to the top left (cell A1) when each worksheet is selected and activated. I tried using the Select, Activate and Show methods for the range in the Worksheet_Activate sub but they didn't work. Any ideas on a simple technique to do so? Thanks, God bless Van |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The following codes worked with me. I think it should work with you too, if you do not have any sepcial stuff in your sheets. Private Sub Worksheet_Activate() Range("A1").Select End Sub ===== * ===== * ===== * ===== Daniel CHEN www.Geocities.com/UDQServices Free Data Processing Add-in< ===== * ===== * ===== * ===== "VanS" wrote in message ... Hello, I have an Excel VBA app and I need automatically scroll to the top left (cell A1) when each worksheet is selected and activated. I tried using the Select, Activate and Show methods for the range in the Worksheet_Activate sub but they didn't work. Any ideas on a simple technique to do so? Thanks, God bless Van |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
see
http://www.mvps.org/dmcritchie/excel...oc.htm#TopLeft specifically: Application.Goto Reference:=Cells(1, 1), Scroll:=True --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "VanS" wrote in message ... Hello, I have an Excel VBA app and I need automatically scroll to the top left (cell A1) when each worksheet is selected and activated. I tried using the Select, Activate and Show methods for the range in the Worksheet_Activate sub but they didn't work. Any ideas on a simple technique to do so? Thanks, God bless Van |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Van
The provided solutions will make A1 the selected cell. You may or may not want that. If not, put this in the ThisWorkbook module: Private Sub Workbook_SheetActivate(ByVal Sh As Object) ActiveWindow.ScrollColumn = 1 ActiveWindow.ScrollRow = 1 End Sub HTH. Best wishes Harald "VanS" skrev i melding ... Hello, I have an Excel VBA app and I need automatically scroll to the top left (cell A1) when each worksheet is selected and activated. I tried using the Select, Activate and Show methods for the range in the Worksheet_Activate sub but they didn't work. Any ideas on a simple technique to do so? Thanks, God bless Van |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks to all of you that replied.
As indicated the Select method doesn't work though it seems it should. Your solutions David and Harald did, so appreciate you help. God bless Van "Harald Staff" wrote: Hi Van The provided solutions will make A1 the selected cell. You may or may not want that. If not, put this in the ThisWorkbook module: Private Sub Workbook_SheetActivate(ByVal Sh As Object) ActiveWindow.ScrollColumn = 1 ActiveWindow.ScrollRow = 1 End Sub HTH. Best wishes Harald "VanS" skrev i melding ... Hello, I have an Excel VBA app and I need automatically scroll to the top left (cell A1) when each worksheet is selected and activated. I tried using the Select, Activate and Show methods for the range in the Worksheet_Activate sub but they didn't work. Any ideas on a simple technique to do so? Thanks, God bless Van |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel- smooth scrolling (instead of 'snap' scrolling) | Setting up and Configuration of Excel | |||
Vertical scrolling...jumps rather than smooth scrolling | Excel Discussion (Misc queries) | |||
Live Scrolling/Real-Time /Smooth Scrolling doesn't work for me in Excel, even 2007 beta | Excel Discussion (Misc queries) | |||
Live Scrolling/Real-Time /Smooth Scrolling doesn't work for me in Excel 2003 | Excel Discussion (Misc queries) | |||
How do I programmatically specify a range. | Excel Programming |