Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code for when a worksheet opens 1

Status
Not open for further replies.

craiogram

MIS
Feb 20, 2004
126
0
0
US
I've tried searching for this topic with no avail.
Is there a way to have code fire when a worksheet opens and where can I put it.
I have a macro that changes the color of some fields based on the value of another but I don't want to have to click anything for it to happen.

Thank you much in advance,
Al
 
Private Sub Workbook_Open()

End Sub


Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Select the desired sheet from the Project Explorer under the Microsoft Excel Objects folder and the navigate to the below default subroutine using the drop down menus above the work area.

Code:
Private Sub Worksheet_Activate()

End Sub
 


Hi,

"...when a worksheet opens..."

Do you mean, when a WORKBOOK opens or when a WORKSHEET activates?

The first two posts represent each of the above, respectively.

Skip,
[sub]
[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top