+ Reply to Thread
Results 1 to 7 of 7

userform change focus

  1. #1
    Forum Contributor
    Join Date
    06-27-2014
    Location
    bristol, england
    MS-Off Ver
    excel 2007
    Posts
    264

    userform change focus

    Hi All
    What I am trying to do is, on a worksheet I have a command button (Month), what I would like is when this button is pressed a userform pops up where the user can pick a month either from a dropdown list or from individual buttons, on selecting the focus returns to the worksheet and the selected month is shown and all other months are hidden, ie jan is A1, FEB B2 ETC.

    any ideas on coding would be appreciated

    scouse14

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: userform change focus

    I'm not sure if this is exactly what you mean, but will hopefully point you in the right direction.

    Code written in such a way it should be easy enough to follow and amend where needed.

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

    BSB
    Attached Files Attached Files

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: userform change focus

    Another approach, did I read it right A1-"Jan", B2-"Feb", etc';
    Attached Files Attached Files

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: userform change focus

    Hmmm... now I'm thinking I completely misunderstood the requirement

    BSB

  5. #5
    Forum Contributor
    Join Date
    06-27-2014
    Location
    bristol, england
    MS-Off Ver
    excel 2007
    Posts
    264

    Re: userform change focus

    Quote Originally Posted by torachan View Post
    Another approach, did I read it right A1-"Jan", B2-"Feb", etc';
    Thank for the reply, sort of(FEB SHOULD HAVE BEEN B1), jan is A1, feb B1 etc, but on choosing from the user for A1 would be shown, B1:L1 would be hidden, if say may was chosen a1:d1 = hidden, e1 shown, f1 to l1 hidden, hope this explains it a bit better

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: userform change focus

    When you say hidden do you mean the column hidden or just the value cleared from the cell?

    BSB

  7. #7
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: userform change focus

    modified code attached file
    Attached Files Attached Files

+ 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] Set No Focus in Userform Multipage Change Event
    By liquidmettle in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-17-2016, 04:54 PM
  2. Change button color twice and release focus after second change
    By juriemagic in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2014, 02:35 AM
  3. Set focus to a page or tab in a userform
    By clapforthewolfman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2013, 12:50 PM
  4. regain focus on a userform
    By david90 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-07-2012, 08:26 PM
  5. [SOLVED] UserForm got focus
    By Henrich in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2006, 11:30 AM
  6. [SOLVED] Userform Focus
    By David Coleman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2006, 01:55 AM
  7. [SOLVED] how to keep focus on txt_box in userform
    By Pierre via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2005, 11:05 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