Results 1 to 5 of 5

Using CheckBox.Caption to determine the workseet name

Threaded View

  1. #1
    Registered User
    Join Date
    12-10-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Post Using CheckBox.Caption to determine the workseet name

    Hi,

    I have many checkboxes named under the file's worksheets. May I use CheckBox.Caption in order to go to a worksheet?

    My suggestion would be like that, but it's not working:

    
    Sub checkboxes()
    
    Dim i As Integer
        For i = 1 To 5
            If ActiveSheet.OLEObjects(i).Object.Value = True Then
               ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
               Sheets("ActiveSheet.OLEObjects(i).Object.Caption").Select
               Sheets("MAJ").Select
               Range("A1").Select
            End If
        Next i
    
    End Sub
    See an example in the file attached.

    Thanks for your help!
    Attached Files Attached Files
    Last edited by nicer2011; 12-20-2011 at 09:45 PM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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