View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
tjc tjc is offline
external usenet poster
 
Posts: 13
Default Macro link problem

I'm trying to create a macro that can be sent to mulitiple users to fix a
button link in a template which the users have all now saved with unique file
names. I've saved the code below in a file named Fix1.xls.

Sub Fix2()
'
ActiveSheet.Shapes("Oval 70").OnAction = "PrintAll"
End Sub

Each user will open OriginalXYZ.xls (each file will have a different file
name), select the appropriate sheet and run the macro saved in Fix1.xls.
Problem occurs when the user selects the button, it looks for the "PrintAll"
macro in the Fix1.xls file instead of where it is stored in the
OriginalXYZ.xls file causing the macro to crash.

Any suggestions on how to correct this problem?