• Checkbox State (2003)

    Author
    Topic
    #454864

    At the end users request, I have created a WB for overtime. Instead of using a Form the end user wants to utilize worksheets for user interaction and wants the structure of the sheets to be laid out exactly as is the current program they are using.

    On one sheet there is a list of 25 names. Any one or more of these names can be eligible for overtime. Each row, in the cell directly next to the name has a Controls Checkbox where when selected that name will be copied to yet another list to be used to populate an overtime slip.

    There are various Command Buttons (copy names, reset selections, process OT slip). I have set several of the Command Buttons to be disabled (in the WB Open event) until such time as at least one checkbox has been selected in the names to copy list at which point the Command Buttons will be enabled.

    I could place a Call to another sub to enable the Command Buttons in every one of the 25 checkbox click events but there has got to be a better, cleaner way to do this. I have tried to modify some of my existing code that iterates thru the controls looking for True values but can not get it to enable the Command Buttons. I have tried placing the code in the WS Change and Selection Change events but nada. I have played around with creating a Checkbox Class but have not been successful there either.

    Should I just bite the bullet and place the Call in each click event? Myself, I would have built this tool differently but the customer wants it to look just like what they are used to using. *sigh*

    Thanks for your time and attention.

    Viewing 0 reply threads
    Author
    Replies
    • #1130234

      With check boxes from the Control Toolbox, you’re stuck with calling a common procedure from each of the On Click event procedures.
      Alternatively, you could use check boxes from the Forms toolbar. These call a standard macro, so you could assign the same macro to each of them.

      • #1130235

        Thank you very much Hans. As always you are a great source.

    Viewing 0 reply threads
    Reply To: Checkbox State (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: