+ Reply to Thread
Results 1 to 3 of 3

Workbook_Open - Multiple Events not all working

  1. #1
    Punsterr
    Guest

    Workbook_Open - Multiple Events not all working

    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!


  2. #2
    Patrick Molloy
    Guest

    RE: Workbook_Open - Multiple Events not all working

    If TypeName(Sh) = "Worksheet" Then Range("a1").Select

    "Punsterr" wrote:

    > 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!
    >
    >


  3. #3
    Punsterr
    Guest

    Re: Workbook_Open - Multiple Events not all working

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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1