Workbook_Open - Multiple Events not all working

  • Thread starter Thread starter Punsterr
  • Start date Start date
P

Punsterr

I have put the following code in This Workbook. The first routine,
containing the splash screen and code to automatically select cell A1
when opening the workbook, seem to be working fine. The second
process, automatically selecting cell A1 when navigating between
worksheets, doesn't seem to work. Any thoughts?

Private Sub Workbook_Open()

' Shows splash screen upon opening the workbook
Application.OnTime Now + TimeValue "00:00:04"),
"KillSplash"
UFSplash.Show

' Opens workbook to Table of Contents cell A1 upon opening the
workbook.
Sheets("Contents").Select
Range("a1").Select

End Sub

Private Sub Workbook_Sheetactivate(ByVal sh As Object)

' When user navigates to different worksheet, opens to cell A1
If TypeName(sh) = "worksheet" Then Range("a1").Select

End Sub


Thanks!
 
Capital "W" worksheet. Nice. I knew it was something silly like that.
Thanks a bunch, Patrick!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top