Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default Assign macro broken after reference removed

I am in the middle of trying to convert my file from a permanent reference to
using RUN. In the main spreadsheet are a number of userform buttons which
call a macro (Sub Menu_New_Site) in one of the modules in the .xla. When I
have a reference set to the .xla the buttons work fine, if I remove the
reference I get the following error:

"The macro 'Menu_New_Site' cannot be found"

Any ideas?

--
Trefor
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Assign macro broken after reference removed

I think I'd create a local macro that calls the macro in the .xla. (It seems
easier to me.)

sub Local_menu_new_site()
application.run "'addinname.xla'!Menu_New_Site"
end sub

I didn't test this, but it seems like it would react to changes in the xla
location better than assigning the macro directly.

Trefor wrote:

I am in the middle of trying to convert my file from a permanent reference to
using RUN. In the main spreadsheet are a number of userform buttons which
call a macro (Sub Menu_New_Site) in one of the modules in the .xla. When I
have a reference set to the .xla the buttons work fine, if I remove the
reference I get the following error:

"The macro 'Menu_New_Site' cannot be found"

Any ideas?

--
Trefor


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default Assign macro broken after reference removed

Dave,

Many thanks, this is my backup if I can not get an answer to my thread "VBA
code to set a reference". If I can get this to work I will not have to make
the changes as you have suggested (I have about 50 button's, so I am not
overly keen to going and edited them all, but will if I have to!)

BTW is there any difference between:

application.run "'addinname.xla'!Menu_New_Site"

and

run "'addinname.xla'!Menu_New_Site"

I have been using the later, is this an issue?

--
Trefor


"Dave Peterson" wrote:

I think I'd create a local macro that calls the macro in the .xla. (It seems
easier to me.)

sub Local_menu_new_site()
application.run "'addinname.xla'!Menu_New_Site"
end sub

I didn't test this, but it seems like it would react to changes in the xla
location better than assigning the macro directly.

Trefor wrote:

I am in the middle of trying to convert my file from a permanent reference to
using RUN. In the main spreadsheet are a number of userform button€„¢s which
call a macro (Sub Menu_New_Site) in one of the modules in the .xla. When I
have a reference set to the .xla the button€„¢s work fine, if I remove the
reference I get the following error:

"The macro 'Menu_New_Site' cannot be found"

Any ideas?

--
Trefor


--

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 warning even though macros have been removed. Stu Excel Discussion (Misc queries) 2 January 3rd 07 03:25 PM
Linest: problems using broken reference data Alex Excel Worksheet Functions 1 May 18th 05 01:22 PM
Has my macro broken Excel? Alan[_27_] Excel Programming 3 October 29th 04 01:58 PM
Broken reference for chr function Bill Murphy Excel Programming 3 June 12th 04 10:23 PM
SP3 removed Macro Security option in Excel 2000 Geckotek[_2_] Excel Programming 2 October 27th 03 08:33 PM


All times are GMT +1. The time now is 12:36 AM.

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"