Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Dec 2001
    Location
    Br. Columbia, Canada
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Checkbox on click event handler (Excel 2000)

    I would like to set up the following Private Sub event handler when a ControlToolbox Checkbox is clicked:
    Put today's date in cell A1 and save it so that when the workbook is opened on a subsequent day the original date is still shown.
    If the checkbox is de-selected, then the date is cleared.
    If CheckBox.Value = True doesn't appear to work for this as the original date is overwritten by the the current day's date.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checkbox on click event handler (Excel 2000)

    The name of a checkbox is normally CheckBox followed by a number. Therefore, the name of the first checkbox put on a form would be CheckBox1, and the formula would be:

    <pre> If CheckBox1.Value = True Then
    </pre>

    Legare Coleman

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checkbox on click event handler (Excel 2000)

    Could you upload a workbook that shows the problem?
    Legare Coleman

  4. #4
    Lounger
    Join Date
    Dec 2001
    Location
    Br. Columbia, Canada
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checkbox on click event handler (Excel 2000)

    (Edited by HansV to provide link to post - see <!help=19>Help 19<!/help>)

    Thanks for your reply.
    I also read your <post#=84780>post 84780</post#> 20-oct-01.
    This doesn't appear to work in this application because the original date attached to the cell is overwritten by when the workbook is opened on a subsequent date.

Posting Permissions

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