+ Reply to Thread
Results 1 to 2 of 2

Macro assignment when copying worksheets

  1. #1
    Registered User
    Join Date
    08-22-2011
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    3

    Macro assignment when copying worksheets

    Hi all,

    I am having some trouble getting macros to assign correctly I have tried to search the forum for similar problems but I get an error message.

    I have two workbooks; template.xls and working.xls which contain macro's assigned to command button clicks. When I copy the sheet located in the template.xls into the working.xls the macro assignment is still set to "template.xls'!button_click#" and I have to go through each command button and manually reassign it to "working.xls'!button_click#"

    Is there anyway I can get excel to do this for me by somehow assigning the button to the button_click macro in the current workbook?

    Thanks in advance.

    Chris.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro assignment when copying worksheets

    Actually, your codes are probably in one or more modules which are not copied with the sheet.
    If your codes are in the sheet you want to copy, it will be copied with it.

+ 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