+ Reply to Thread
Results 1 to 3 of 3

Excel 2010 User_Form Activate Event Not Updating form Check boxes

  1. #1
    Registered User
    Join Date
    08-10-2011
    Location
    Orlando
    MS-Off Ver
    Excel 2010
    Posts
    1

    Unhappy Excel 2010 User_Form Activate Event Not Updating form Check boxes

    Hi all. I'm writing a performance appraisal tool in Excel, using mostly VBA. From the main sheet I call a user_form via a macro assignment.

    The user_form opens and displays 7 Check boxes. My intent is to go to a worksheet , read a value that will be set to either TRUE or FALSE, and assign it to a corresponding temporary variable.

    The next step is to use an IF statement to determine if the value is TRUE, and if so, set the corresponding check box to true (ckecked), or if FALSE, then set the Corresponding check box value to false.

    The code is shown below. The message boxes added were for troubleshooting. What's interesting is that the First time I run the form, all check boxes are shown as unchecked (value = false). Once I check a box and save, then hide it, the next time I unhide (activate) it, the chack boxes behave as I expect them to from that point on. If I exit the workbook and re-enter, then my initial problem is back.

    MsgBox ("SMART Value 1 = " & Sheets("SMART").Cells(1, 7).Value) Evaluates to "True" on first run.

    MsgBox ("TempGoal1Vis =" & Me.TempGoal1Vis) Evaluates to "True" om first run.

    Then my next message is: MsgBox ("Hit if-for False " & Me.CheckBox1.Value) which is False.

    I'm fairly good at VB, but am finding the excel VBA a bit constraining and the more advanced features of VBA not so well documented.

    Any suggestions on how to attack this are GREATLY appreciated. Thank you!


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

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Excel 2010 User_Form Activate Event Not Updating form Check boxes

    Do you have some code that changes the actual values in column G of the worksheet?
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Excel 2010 User_Form Activate Event Not Updating form Check boxes

    Use Initialize:
    I think only 1 variable is sufficient:
    Please Login or Register  to view this content.



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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