Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
SpeclAngel
 
Posts: n/a
Default how do I keep a macro with spreadsheet when moved

I am trying to keep a macro with a workbook when I move it from my laptop to
my desk computer. I have to redirect the macro everytime I move the workbook
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

It sounds like you're assigning the macro to a button/object/icon on a toolbar.

If that's the case, you may want to reassign the macro in code to the workbook
that owns the macro.

If you used a button from the Forms toolbar, a simple change may work for you.

Delete that button and use a commandbutton from the control toolbox toolbar.

Then double click on that commandbutton and have that code call your macro:

Option Explicit
Private Sub CommandButton1_Click()
Call myExistingMacro
End Sub


If you have trouble, you may want to post back with more details.

SpeclAngel wrote:

I am trying to keep a macro with a workbook when I move it from my laptop to
my desk computer. I have to redirect the macro everytime I move the workbook


--

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
Macro not found when spreadsheet viewed in Internet Explorer? Ben Excel Discussion (Misc queries) 1 February 10th 05 07:31 PM
Spreadsheet print including macro buttons? gunga Excel Discussion (Misc queries) 4 February 10th 05 06:30 PM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Excel Discussion (Misc queries) 1 February 8th 05 09:34 AM
Run a macro when opening a spreadsheet Duncan Help Excel Discussion (Misc queries) 5 January 10th 05 05:33 PM
Sample spreadsheet of using macro Isaac Excel Worksheet Functions 2 November 19th 04 02:22 AM


All times are GMT +1. The time now is 05:27 AM.

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

About Us

"It's about Microsoft Excel"