Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default Sheet selected, automatic return to top of sheet

Hi all.

Is there a formula that...When a sheet is selected via a macro button, you
are automatically returned to the top of the selected sheet...or, when you
open your workbook the next day all sheets are returned to the top.

If this is possible I would need sheets returned to Row 8, as Rows 1-7 are
frozen

Thanks in advance
Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Sheet selected, automatic return to top of sheet

You need these two event sub for it:

Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
ws.Range("A8").Select
Next ws
Worksheets(1).Activate
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A8").Select
End Sub


Post if you need help to install them!

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Hi all.

Is there a formula that...When a sheet is selected via a macro button, you
are automatically returned to the top of the selected sheet...or, when you
open your workbook the next day all sheets are returned to the top.

If this is possible I would need sheets returned to Row 8, as Rows 1-7 are
frozen

Thanks in advance
Mike

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default Sheet selected, automatic return to top of sheet

I went to install in WorkBook and i get ..........Compile error:
Ambiguous name
detected:Workbook_Open

"Stefi" wrote:

You need these two event sub for it:

Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
ws.Range("A8").Select
Next ws
Worksheets(1).Activate
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A8").Select
End Sub


Post if you need help to install them!

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Hi all.

Is there a formula that...When a sheet is selected via a macro button, you
are automatically returned to the top of the selected sheet...or, when you
open your workbook the next day all sheets are returned to the top.

If this is possible I would need sheets returned to Row 8, as Rows 1-7 are
frozen

Thanks in advance
Mike

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Sheet selected, automatic return to top of sheet

You only get one Workbook_Open event per workbook.

You'll have to merge the procedures into one.

If you need help, you should post both procedures in your follow-up.

MIKEY wrote:

I went to install in WorkBook and i get ..........Compile error:
Ambiguous name
detected:Workbook_Open

"Stefi" wrote:

You need these two event sub for it:

Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
ws.Range("A8").Select
Next ws
Worksheets(1).Activate
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A8").Select
End Sub


Post if you need help to install them!

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Hi all.

Is there a formula that...When a sheet is selected via a macro button, you
are automatically returned to the top of the selected sheet...or, when you
open your workbook the next day all sheets are returned to the top.

If this is possible I would need sheets returned to Row 8, as Rows 1-7 are
frozen

Thanks in advance
Mike


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default Sheet selected, automatic return to top of sheet

Thanks Stefi

I used the first formula and all my sheets return to the beginning. I have
some sheets that are Frozen in screen view and they don't move. How do I
omit these from the formula.

There are 35 sheets I would like to omit and I guess I will need to list
these. The sheets are not in numerical order

Regards
Mike

"Stefi" wrote:

You need these two event sub for it:

Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
ws.Range("A8").Select
Next ws
Worksheets(1).Activate
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A8").Select
End Sub


Post if you need help to install them!

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Hi all.

Is there a formula that...When a sheet is selected via a macro button, you
are automatically returned to the top of the selected sheet...or, when you
open your workbook the next day all sheets are returned to the top.

If this is possible I would need sheets returned to Row 8, as Rows 1-7 are
frozen

Thanks in advance
Mike



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Sheet selected, automatic return to top of sheet

Sorry, I couldn't find out what you mean on "Frozen in screen view", please
clarify it. Isn't there any common properties of sheets to be omitted?

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Thanks Stefi

I used the first formula and all my sheets return to the beginning. I have
some sheets that are Frozen in screen view and they don't move. How do I
omit these from the formula.

There are 35 sheets I would like to omit and I guess I will need to list
these. The sheets are not in numerical order

Regards
Mike

"Stefi" wrote:

You need these two event sub for it:

Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
ws.Range("A8").Select
Next ws
Worksheets(1).Activate
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A8").Select
End Sub


Post if you need help to install them!

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Hi all.

Is there a formula that...When a sheet is selected via a macro button, you
are automatically returned to the top of the selected sheet...or, when you
open your workbook the next day all sheets are returned to the top.

If this is possible I would need sheets returned to Row 8, as Rows 1-7 are
frozen

Thanks in advance
Mike

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default Sheet selected, automatic return to top of sheet

You can't scroll down or across i.e. freeze pane
Common properties for sheets to be omitted...they are 'help' sheets for the
users

Cheers Mike
..

"Stefi" wrote:

Sorry, I couldn't find out what you mean on "Frozen in screen view", please
clarify it. Isn't there any common properties of sheets to be omitted?

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Thanks Stefi

I used the first formula and all my sheets return to the beginning. I have
some sheets that are Frozen in screen view and they don't move. How do I
omit these from the formula.

There are 35 sheets I would like to omit and I guess I will need to list
these. The sheets are not in numerical order

Regards
Mike

"Stefi" wrote:

You need these two event sub for it:

Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
ws.Range("A8").Select
Next ws
Worksheets(1).Activate
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A8").Select
End Sub


Post if you need help to install them!

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Hi all.

Is there a formula that...When a sheet is selected via a macro button, you
are automatically returned to the top of the selected sheet...or, when you
open your workbook the next day all sheets are returned to the top.

If this is possible I would need sheets returned to Row 8, as Rows 1-7 are
frozen

Thanks in advance
Mike

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Sheet selected, automatic return to top of sheet

Try these:

Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
If Not ActiveWindow.FreezePanes Then _
ws.Range("A8").Select
Next ws
Worksheets(1).Activate
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Not ActiveWindow.FreezePanes Then _
Sh.Range("A8").Select
End Sub



--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

You can't scroll down or across i.e. freeze pane
Common properties for sheets to be omitted...they are 'help' sheets for the
users

Cheers Mike
.

"Stefi" wrote:

Sorry, I couldn't find out what you mean on "Frozen in screen view", please
clarify it. Isn't there any common properties of sheets to be omitted?

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Thanks Stefi

I used the first formula and all my sheets return to the beginning. I have
some sheets that are Frozen in screen view and they don't move. How do I
omit these from the formula.

There are 35 sheets I would like to omit and I guess I will need to list
these. The sheets are not in numerical order

Regards
Mike

"Stefi" wrote:

You need these two event sub for it:

Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
ws.Range("A8").Select
Next ws
Worksheets(1).Activate
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A8").Select
End Sub


Post if you need help to install them!

--
Regards!
Stefi



€˛MIKEY€¯ ezt Ć*rta:

Hi all.

Is there a formula that...When a sheet is selected via a macro button, you
are automatically returned to the top of the selected sheet...or, when you
open your workbook the next day all sheets are returned to the top.

If this is possible I would need sheets returned to Row 8, as Rows 1-7 are
frozen

Thanks in advance
Mike

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
copying only selected data from Sheet 1 to Sheet 2 Jaf Excel Worksheet Functions 2 September 1st 09 01:01 AM
lookup single value in one sheet, return multiple results from theother sheet Chuck[_3_] Excel Worksheet Functions 1 April 4th 08 06:17 AM
Updating excel sheet with selected data from another sheet in the same file gsnivas Excel Worksheet Functions 1 August 4th 05 09:55 AM
how do i make it so that when a sheat is selected either via link or tab, that xlLastCell is selected. the last on the sheet. Daniel Excel Worksheet Functions 1 July 12th 05 01:30 AM
Automatic cell increment with data from sheet 1 to sheet 2 Big G Excel Worksheet Functions 2 December 20th 04 05:59 PM


All times are GMT +1. The time now is 03:22 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"