+ Reply to Thread
Results 1 to 3 of 3

Excel and Visual Basic

Hybrid View

Guest Excel and Visual Basic 06-25-2006, 08:35 PM
Leith Ross Hello Arand, Copy this... 06-25-2006, 09:59 PM
Guest Re: Excel and Visual Basic 06-25-2006, 11:20 PM
  1. #1
    arand
    Guest

    Excel and Visual Basic

    Hello,

    I am trying to create a command button in Microsoft Excel (Office 2000) that
    enables me to reset the check box status for a worksheet from checked to
    unchecked. The worksheet contains approximately 50 check boxes and is meant
    to be reused. Is this possible? If so, how can I program it to do so? Thanks.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Arand,

    Copy this macro into a VBA module and then attach the macro to your command button. It will clear all chekboxes on the active worksheet automatically.

    Sub ClearCheckBoxes()
    
        Dim AutoShape
        
          For Each AutoShape In ActiveSheet.Shapes
            If AutoShape.Type = msoFormControl Then
               If AutoShape.FormControlType = xlCheckBox Then
                  AutoShape.ControlFormat.Value = False
               End If
            End If
          Next AutoShape
          
    End Sub
    Sincerely,
    Leith Ross

  3. #3
    Norman Jones
    Guest

    Re: Excel and Visual Basic

    Hi Arand,

    Assuming that the checkboxes are from the Forms toolbar, try:

    '=============>>
    Public Sub Tester()
    ActiveSheet.CheckBoxes.Value = xlOff
    End Sub
    '<<=============


    ---
    Regards,
    Norman


    "arand" <u23437@uwe> wrote in message news:62531f4ca81e7@uwe...
    > Hello,
    >
    > I am trying to create a command button in Microsoft Excel (Office 2000)
    > that
    > enables me to reset the check box status for a worksheet from checked to
    > unchecked. The worksheet contains approximately 50 check boxes and is
    > meant
    > to be reused. Is this possible? If so, how can I program it to do so?
    > Thanks.




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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