+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Spammer
    Join Date
    02-26-2009
    Location
    India
    MS-Off Ver
    Outlook
    Posts
    98

    Macro for creating checkbox in the Form

    Hi,

    I am trying to write a macro that will be associated with the forms checkbox. What I want to do is simple, but cannot get it to run properly.

    What i need is when you put a check in the box - it displays certain text.

    Give me some help

  2. #2
    Spammer
    Join Date
    02-26-2009
    Location
    U.S
    MS-Off Ver
    Access
    Posts
    73

    Re: Macro for creating checkbox in the Form

    Hi ,

    Checkout this link...this will help you..

    http://www.bigresource.com/VB-CheckB...tml#g2oKjO16Nq

  3. #3
    Forum Administrator
    Join Date
    03-18-2009
    Location
    India
    MS-Off Ver
    2003,2007
    Posts
    222

    Re: Macro for creating checkbox in the Form

    You can get some idea from this code:

    Code:
    Sub Selection_Print()
    Dim strSheetActive As String
    Dim chkb As Control
    
        strSheetActive = ThisWorkbook.ActiveSheet.Name
        
        For Each chkb In Me.Controls
            
            'naming convention - find check boxes
            If Left(chkb.Name, 3) = "chk" Then
            
                If chkb.Value = True Then
                'do yer funky stuff              
                End If
                
            End If
            
        Next chkb
            
        ThisWorkbook.Sheets(strSheetActive).Activate
        
    End Sub
    ExlGuru

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.2.0