+ Reply to Thread
Results 1 to 2 of 2

How to code actions to happen when a userform.show event occurs

  1. #1
    Forum Contributor
    Join Date
    02-01-2021
    Location
    Manchester
    MS-Off Ver
    365
    Posts
    216

    How to code actions to happen when a userform.show event occurs

    I have used the following code to ensure that my two option buttons are in the required state every time a userform is shown.
    Please Login or Register  to view this content.
    This works when the app starts from cold (The first activity is userform1.show)
    But on subsequent showing of the form it does not.
    Is this because the initialization of the form is the wrong activity, or because the OptionButton .Value should be something other than True/False
    Or something else?
    The samples in the MS Help guide seem to imply that my code should work, so I'm stuck and would welcome help
    John

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

    Re: How to code actions to happen when a userform.show event occurs

    What userform activity are you performing before your second case of userform1.show - if the form has been unloaded then the initialise event should perform again on show.
    see big yellow banner - how to upload your workbook so that we see all code to see what you are trying to achieve.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

+ 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. A chart to show how often an event occurs
    By MariaXD in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-22-2022, 08:18 AM
  2. what event(s) happen between Double click and Worksheet_BeforeDoubleClick
    By dadadavid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2018, 03:14 AM
  3. [SOLVED] UserForm Change of data value event- Label show or hide
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2014, 11:54 AM
  4. [SOLVED] change event incorporating two different actions vba
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2014, 05:48 AM
  5. [SOLVED] Combining two different actions in one event
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-02-2013, 07:13 PM
  6. [SOLVED] Event Change question--trying to make two things happen in the same sheet.
    By Jaron_t in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2012, 04:41 PM
  7. How to calculate probability of an event will happen multipe times in a row
    By kokky in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2009, 01:54 PM

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