+ Reply to Thread
Results 1 to 13 of 13

Finding CellRef for Control+Home

Hybrid View

  1. #1
    Tom Ogilvy
    Guest

    Re: Finding CellRef for Control+Home

    Is the Userform Modeless or Modal. If modal, you will need to drop the
    userform. If modeless, try adding

    Private Sub ComboBox1_Change()
    Myws = ComboBox1.Value
    Worksheets(Myws).Activate
    AppActivate Application.Caption
    End Sub


    --
    Regards,
    Tom Ogilvy

    "Jim May" <JimMay@discussions.microsoft.com> wrote in message
    news:0B95B25D-1904-4344-A163-7251D6735D6C@microsoft.com...
    > Thanks Tom;
    > I've got "this part, that is the Control+Home" now working;
    > Only LAST problem is when I select a ws from my combobox -- the focus
    > remain on/in the cb, versus "jumping to" the worksheet just activated.
    > See any "Flaws" with what I'm using (below)?
    >
    > Private Sub ComboBox1_Change()
    > Myws = ComboBox1.Value
    > Worksheets(Myws).Activate
    > End Sub
    >
    > Private Sub UserForm_Initialize()
    > Dim ws As Worksheet
    > For Each ws In Worksheets
    > ComboBox1.AddItem ws.Name
    > Next
    > End Sub
    >
    >
    >
    > "Tom Ogilvy" wrote:
    >
    > > Perhaps your real desire is to do the equivalent of Ctrl+Home
    > >
    > > Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    > > 'CtrlHome
    > > Dim rng as Range
    > > Application.Goto Range("A1"), True
    > > set rng = ActiveWindow.VisibleRange(1, 1)
    > > rng.Select
    > > End Sub
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "Jim May" <JimMay@discussions.microsoft.com> wrote in message
    > > news:C1F9F6D9-4433-4464-9964-B7E0657BE385@microsoft.com...
    > > > Is there a way I can determine the .address of the cell that is the
    > > > result of the Control+Home on any sheet that I might activate (and
    > > > I have over 100 sheets)?
    > > > I'd like to incorporate it into a
    > > > Private Sub Workbook_SheetActivate(ByVal Sh As Object) ' macro
    > > >
    > > > Tks in Advance

    > >
    > >
    > >




  2. #2
    Jim May
    Guest

    Re: Finding CellRef for Control+Home

    Tom:
    My Userform is Modeless so AppActivate Application.Caption did the trick!!
    Thanks a million... hummmm I've gonna have to quite saying that -- I already
    owe you well over a 100 million LOL,,,
    Jim May

    "Tom Ogilvy" wrote:

    > Is the Userform Modeless or Modal. If modal, you will need to drop the
    > userform. If modeless, try adding
    >
    > Private Sub ComboBox1_Change()
    > Myws = ComboBox1.Value
    > Worksheets(Myws).Activate
    > AppActivate Application.Caption
    > End Sub
    >
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Jim May" <JimMay@discussions.microsoft.com> wrote in message
    > news:0B95B25D-1904-4344-A163-7251D6735D6C@microsoft.com...
    > > Thanks Tom;
    > > I've got "this part, that is the Control+Home" now working;
    > > Only LAST problem is when I select a ws from my combobox -- the focus
    > > remain on/in the cb, versus "jumping to" the worksheet just activated.
    > > See any "Flaws" with what I'm using (below)?
    > >
    > > Private Sub ComboBox1_Change()
    > > Myws = ComboBox1.Value
    > > Worksheets(Myws).Activate
    > > End Sub
    > >
    > > Private Sub UserForm_Initialize()
    > > Dim ws As Worksheet
    > > For Each ws In Worksheets
    > > ComboBox1.AddItem ws.Name
    > > Next
    > > End Sub
    > >
    > >
    > >
    > > "Tom Ogilvy" wrote:
    > >
    > > > Perhaps your real desire is to do the equivalent of Ctrl+Home
    > > >
    > > > Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    > > > 'CtrlHome
    > > > Dim rng as Range
    > > > Application.Goto Range("A1"), True
    > > > set rng = ActiveWindow.VisibleRange(1, 1)
    > > > rng.Select
    > > > End Sub
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > >
    > > > "Jim May" <JimMay@discussions.microsoft.com> wrote in message
    > > > news:C1F9F6D9-4433-4464-9964-B7E0657BE385@microsoft.com...
    > > > > Is there a way I can determine the .address of the cell that is the
    > > > > result of the Control+Home on any sheet that I might activate (and
    > > > > I have over 100 sheets)?
    > > > > I'd like to incorporate it into a
    > > > > Private Sub Workbook_SheetActivate(ByVal Sh As Object) ' macro
    > > > >
    > > > > Tks in Advance
    > > >
    > > >
    > > >

    >
    >
    >


+ 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