Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copying modules and links

I have a workbook that contains VB macros(Excel). I want to copy certain
sheets from this workbook to another workbook and share it with others.
However, when I do this and send it to them, the macro refers back to my
original workbook.

Example: a simple button(macro assigned to it) is used to navigate to
certain sections of the worksheet works fine in original. But when I copy
it to a new book, it tries to "link" back(find) to the original(even though
I have copied the corresponding macro module to the new workbook). Is there
an easy way to just tell it to look for the module with the same name
"locally"?

Sorry if this is an easy one; I just can't find answer in the "help".

Thanks, Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,365
Default copying modules and links

Make a copy of the entire workbook, then edit that workbook to remove any
extra sheets you don't want. Send that copy to them.

You can either open Excel, open the workbook, use SaveAs to save under a new
name to get the new book, or just use Windows Explorer to make a copy of the
file.

"Bob Meixner" wrote:

I have a workbook that contains VB macros(Excel). I want to copy certain
sheets from this workbook to another workbook and share it with others.
However, when I do this and send it to them, the macro refers back to my
original workbook.

Example: a simple button(macro assigned to it) is used to navigate to
certain sections of the worksheet works fine in original. But when I copy
it to a new book, it tries to "link" back(find) to the original(even though
I have copied the corresponding macro module to the new workbook). Is there
an easy way to just tell it to look for the module with the same name
"locally"?

Sorry if this is an easy one; I just can't find answer in the "help".

Thanks, Bob



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default copying modules and links

Hi Bob,

Right-click on the button and choose "Assign Macro". In the Macro name
field, the part before the "!" is the worksheet that contains the sub.
Change it to the current workbook or delete it altogether (including
the "!").

Regards,
Steve
www.stkomp.com

Bob Meixner wrote:
I have a workbook that contains VB macros(Excel). I want to copy certain
sheets from this workbook to another workbook and share it with others.
However, when I do this and send it to them, the macro refers back to my
original workbook.

Example: a simple button(macro assigned to it) is used to navigate to
certain sections of the worksheet works fine in original. But when I copy
it to a new book, it tries to "link" back(find) to the original(even though
I have copied the corresponding macro module to the new workbook). Is there
an easy way to just tell it to look for the module with the same name
"locally"?

Sorry if this is an easy one; I just can't find answer in the "help".

Thanks, Bob


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default copying modules and links

If you were to use the commandbutton from the control toolbox toolbar, then the
code for that commandbutton would be behind that sheet.

And when you copy the sheet to a new workbook, the code would copy over, too.

If you can replace that button with a commandbutton, you may find it easier.

Bob Meixner wrote:

I have a workbook that contains VB macros(Excel). I want to copy certain
sheets from this workbook to another workbook and share it with others.
However, when I do this and send it to them, the macro refers back to my
original workbook.

Example: a simple button(macro assigned to it) is used to navigate to
certain sections of the worksheet works fine in original. But when I copy
it to a new book, it tries to "link" back(find) to the original(even though
I have copied the corresponding macro module to the new workbook). Is there
an easy way to just tell it to look for the module with the same name
"locally"?

Sorry if this is an easy one; I just can't find answer in the "help".

Thanks, Bob


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying modules from Word to Excel Pflugs Excel Programming 0 June 5th 06 06:32 PM
Copying UserForms & Modules to another workbook excelnut1954 Excel Programming 2 May 24th 06 10:19 PM
Extracting (copying) modules from one workbook to another. Devin Linnington Excel Programming 1 July 6th 05 11:59 PM
Copying VBA modules from one workbook to another with a macro? Revolvr[_2_] Excel Programming 2 May 6th 04 11:04 AM
Copying modules Steven Revell Excel Programming 2 September 24th 03 01:01 PM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"