+ Reply to Thread
Results 1 to 4 of 4

Copy form controls to other workbooks

  1. #1
    Registered User
    Join Date
    12-28-2013
    Location
    Halmstad, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    19

    Copy form controls to other workbooks

    Hi,

    I have a macro that I have put in a form control. Once a month the entire sheet will be copied to another workbook including the formcontrol with the macro.

    Problem is that when the sheet is copied the macro in the new workbook will refer to the old workbook, hence when running the macro the old workbook will open automatically which I donīt want it to do.


    Anybody knows how to solve this? I could do it as an Add-In or put it in my personal macros however I donīt want to force an add-in to my collageous. Tried to solve it with an Active X-control but was not as easy just to copy and paste the macro.


    I can email the workbook to anybody who wants to help if itīs need

  2. #2
    Forum Contributor
    Join Date
    07-10-2012
    Location
    Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: Copy form controls to other workbooks

    dear expert

    do one thing
    copy your macros code in notebook

    every time create new form control and configure new macro name

    and paste your code

    i think this will solve your problem

    keep in mind one thing where you write macro and link form control to it next time you cut paste said sheet

    form control search parent workbook where script is written

    do it for anything please revert

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: Copy form controls to other workbooks

    What's does the code look like?

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Copy form controls to other workbooks

    How are you making the new copy of the Workbook?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Form Controls v. ActiveX Controls
    By Richard Stringfellow in forum Excel General
    Replies: 2
    Last Post: 01-11-2016, 08:06 PM
  2. copy data from form to 6 different workbooks
    By Jenkins27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2015, 04:47 PM
  3. Form Controls / Active X controls to record and log information in a seperate sheet
    By marcbarnett in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-09-2014, 05:00 AM
  4. Replies: 1
    Last Post: 05-01-2014, 05:15 PM
  5. Replies: 2
    Last Post: 12-04-2013, 11:49 AM
  6. Form controls vs. ActiveX controls
    By wmorrison49 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2008, 10:59 AM
  7. ActiveX Controls vs Form Controls
    By Alex in forum Excel General
    Replies: 1
    Last Post: 01-11-2006, 04:50 AM

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