+ Reply to Thread
Results 1 to 8 of 8

Set focus to selected sheet when userform is open and using making use of RefEdit

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,215

    Set focus to selected sheet when userform is open and using making use of RefEdit

    Hey guys...

    Strange how one realizes what one does not quite yet know unless an situation arises...

    In attached file...after clicking image and opening userform
    When then selecting a different sheet i.e Sheet1 and selecting the green range.How can I keep focus on sheet1 instead of it moving to the sheet originally opened on...i.e sheet2 when clicking option button or any other button on userform...
    Attached Files Attached Files
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Set focus to selected sheet when userform is open and using making use of RefEdit

    What about adding this piece of code in your existing one.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Set focus to selected sheet when userform is open and using making use of RefEdit

    Or

    In Userform Code

    Please Login or Register  to view this content.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,215

    Re: Set focus to selected sheet when userform is open and using making use of RefEdit

    Hi Sixthsense

    Thanks for your reply...The actual file is a Statistical Analytical Tool add-in
    There are multiple other controls on each of the 15 userforms...
    There could be multiple different sheets so the code must keep focus on the sheet selected while the userform is open...

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Set focus to selected sheet when userform is open and using making use of RefEdit

    I hope any of the below option will help you.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,215

    Re: Set focus to selected sheet when userform is open and using making use of RefEdit

    I suppose what i need is and event after RefEdit updates that activates the Parent sheet
    Something like this...which does not work...
    Please Login or Register  to view this content.
    Last edited by sintek; 08-06-2018 at 06:46 AM.

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,215

    Re: Set focus to selected sheet when userform is open and using making use of RefEdit

    So Sixthsense

    I ended up going with the following...Made use of your advice after noticing that the next step would be either 1 of 2 Option button selections...so code in both option Button controls
    Please Login or Register  to view this content.

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Set focus to selected sheet when userform is open and using making use of RefEdit

    Glad you fixed it and thanks for the update

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Want to open selected file from listbox (Userform)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-04-2017, 12:34 PM
  2. [SOLVED] Want to open selected file from listbox (Userform)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2017, 12:47 PM
  3. [SOLVED] Want to open selected file from listbox (Userform)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2017, 12:45 PM
  4. open a userform next to the selected cell
    By chibouki in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-03-2016, 11:39 PM
  5. Replies: 1
    Last Post: 07-23-2014, 12:13 PM
  6. [SOLVED] Userform textbox used as refedit
    By Jacques Grobler in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 06-29-2012, 01:45 AM
  7. Cant Seem To Deselct RefEdit Box On Userform
    By JR@SGC in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2007, 08:28 AM

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