Results 1 to 2 of 2

Copy Active X control and code

Threaded View

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

    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.

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