+ Reply to Thread
Results 1 to 2 of 2

Copy Active X control and code

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Copy Active X control and code

    I am running a simple code in a template sheet off an ActiveX check box. The template sheet is used as a Copy All and Paste All when a new sheet is created. How do I get the ActiveX control and associated code to go with the template when the new sheet is created?

    #Private Sub CheckBox2_Click()
    Dim DescriptionCell As Range

    Set DescriptionCell = ActiveSheet.Range("C:AP")
    If CheckBox2.Value = True Then
    DescriptionCell.EntireColumn.Hidden = True
    ActiveSheet.Range("$BC$1:$BC$349").AutoFilter Field:=1, Criteria1:="P"
    Else
    DescriptionCell.EntireColumn.Hidden = False
    ActiveSheet.Range("$BC$1:$BC$349").AutoFilter Field:=1
    End If
    End Sub#
    Last edited by BRISBANEBOB; 11-19-2011 at 04:39 PM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy Active X control and code

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

+ 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