Results 1 to 5 of 5

Copying ActiveX Command Button from master sheet to subsheets. command button code missing

Threaded View

popper08 Copying ActiveX Command... 12-12-2020, 11:41 AM
6StringJazzer Re: Copying ActiveX Command... 12-12-2020, 12:57 PM
popper08 Re: Copying ActiveX Command... 12-12-2020, 08:43 PM
6StringJazzer Re: Copying ActiveX Command... 12-12-2020, 10:42 PM
popper08 Re: Copying ActiveX Command... 12-13-2020, 10:15 AM
  1. #1
    Registered User
    Join Date
    12-12-2020
    Location
    southampton
    MS-Off Ver
    365
    Posts
    11

    Copying ActiveX Command Button from master sheet to subsheets. command button code missing

    Hi, been searching for an answer on this. probably simple or a limitation but i cant work it out

    i have a master sheet that i copy into other subsheets. the master sheet has formula's that work on new pasted dated. it all works fine.

    I added some Active X Command buttons to the master sheet for filtering and when i create the subsheet the buttons get copied across but i lose the command button code in the original master sheet.

    Example of master sheet code for TWO buttons are:

    Private Sub CommandButton1_Click()
    ' command button 1 runs the hide and show trap 1 details
        Application.Run "'greyhounds workings.xlsm'!Trap1show"
    End Sub
    
    Private Sub CommandButton2_Click()
    '
        Rows("72:119").Select
        Selection.EntireRow.Hidden = True
        Rows("80:87").Select
        Selection.EntireRow.Hidden = False
    End Sub
    
    when i click on the button in the subsheet nothing happens. 
    when i then go into developer mode and view code for the button i first get any empty "GENERAL" tab. clicking on command button 1 brings up the following
    
    Private Sub CommandButton1_Click()
    
    End Sub
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    I have done the same for not active x buttons, being Form Control buttons and the button code IS copied across

    Active X Command Button code isn't copied across. please help driving me mad

    Paul
    Last edited by 6StringJazzer; 12-12-2020 at 12:50 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Command Button vs ActiveX Button Causing System Resource Drain
    By Logit in forum Excel General
    Replies: 0
    Last Post: 02-13-2019, 11:49 AM
  2. ActiveX Command Button combined with ActiveX List Boxes – VBA Code Needed
    By Stlcards13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2017, 02:56 PM
  3. [SOLVED] ActiveX command button open sheet
    By ricklou in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-30-2017, 03:51 AM
  4. VBA code to create command button. Print all sheets then delete command button.
    By Declamatory in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2015, 05:18 PM
  5. [SOLVED] Conditionally Hide or deactivate code in an activeX command Button.
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2014, 12:19 PM
  6. Master Command Button to call on other Command Buttons located in other Workbooks
    By MrNickRegan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2013, 07:57 PM
  7. Code for a master command button to change the backcolor of multiple command buttons?
    By panttherm5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-16-2012, 10:11 PM

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