Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 72
Default Activate the top of sheet

I need to find a way to make the top of each sheet in a workbook visible
after my code runs. I tried "select" and "activate" but when you select
the sheet, the visible range is different.

Thanks in advance for help with this.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 695
Default Activate the top of sheet

Application.Goto Range("A1"), True




"AD108" skrev:

I need to find a way to make the top of each sheet in a workbook visible
after my code runs. I tried "select" and "activate" but when you select
the sheet, the visible range is different.

Thanks in advance for help with this.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Activate the top of sheet

Couple of methods.

Add this to your macro

Sub test()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets
ActiveWindow.ScrollRow = 1
'Range("A1").Select 'If you wish
Next ws
End Sub

Or in Thisworkbook module

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ActiveWindow.ScrollRow = 1
End Sub


Gord Dibben MS Excel MVP

On Sat, 29 Jul 2006 21:09:13 -1000, "AD108" wrote:

I need to find a way to make the top of each sheet in a workbook visible
after my code runs. I tried "select" and "activate" but when you select
the sheet, the visible range is different.

Thanks in advance for help with this.


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
Sheet activation CWillis Excel Discussion (Misc queries) 5 June 1st 06 09:50 PM
how would activate the previous sheet in macro Vicky Excel Discussion (Misc queries) 1 May 27th 06 09:18 AM
Lookup function and compare Student Excel Discussion (Misc queries) 8 April 25th 06 03:11 PM
how to activate a drop down menu in spreed sheet with space bar? Raza Excel Discussion (Misc queries) 0 April 20th 06 05:21 PM
Using a relative SHEET reference for source data in a chart James Charts and Charting in Excel 6 August 16th 05 05:07 PM


All times are GMT +1. The time now is 08:20 PM.

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

About Us

"It's about Microsoft Excel"