Re: Help with some simple code
- From: "Bob Phillips" <bob.NGs@xxxxxxxxxxxxx>
- Date: Wed, 11 Oct 2006 23:54:58 +0100
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A1").Select
End Sub
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Angeline" <Angeline@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E4DD5640-D4CF-4FB7-B284-9AA3DAA1B68C@xxxxxxxxxxxxxxxx
Hi There,opened
I was given the following code to ensure that whenever a workbook is
it will always go to Sheet1 and A1. This was great:module
Private Sub Workbook_Open()
Sheets("Sheet1").Select
Range("A1").Select
End Sub
I'm now requiring something similar to ensure that if any other sheets are
selected once the workbook is opened, the command [Range("A1").Select]
occurs.So, could someone help me with the first part of the code. I assume
you would go into the code viewer for each *** and add something like:
Sheet1_Open()
Sheets("Sheet1").Select
Range("A1").Select
End Sub
I think I tried this but a compile error when I opened up the workbook.
Hope someone can help (something tells me I could put some code in a
so that I wan't have to repeat it for each ***. However, happy to justget
the basic code to put in if that is not viable)
Hope someone can help
.
- Prev by Date: Re: Removing spaces from cells not possible?
- Next by Date: Re: Rembrandt Mortgage Function
- Previous by thread: Re: Help with formula, please.
- Next by thread: Re: Help with some simple code
- Index(es):