Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Long Beach, California, USA
    Posts
    233
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Checkbox State (2003)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Checkbox State (2003)

    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.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Long Beach, California, USA
    Posts
    233
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checkbox State (2003)

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •