Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Macro - Doesn't work in dedicate module

Hi,

I made a macro related to a WB that in this example we can call "WB A".

Then, I had another WB, that here we call "WB B" with the same format as WB A, therefore I thought it was a good idea to apply the same macro as WB A to give a different formatting.

I opened WB A and WB B, copied the macro from the Module of WB A, expanded WB B, inserted a Module and copied the code.
Tried, it works!

Where's the issue?
The issue is that when I open WB B and run the macro, in addition to the initial OK to enable the macro, it asks to enable the macros of WB A as well.
To sum up, if I look into the project part on VB, I can see the two WBs, each of them has got his own module to operate the macro, but WB B needs WB A to run it.

Where am I wrong?

Thanks for your help
Alex

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Macro - Doesn't work in dedicate module

Perhaps the macro makes specific references to WB A? If you post the macro
it would be easier to diagnose the problem.

--

Vasant

"Metallo" wrote in message
...
Hi,

I made a macro related to a WB that in this example we can call "WB A".

Then, I had another WB, that here we call "WB B" with the same format as

WB A, therefore I thought it was a good idea to apply the same macro as WB A
to give a different formatting.

I opened WB A and WB B, copied the macro from the Module of WB A, expanded

WB B, inserted a Module and copied the code.
Tried, it works!

Where's the issue?
The issue is that when I open WB B and run the macro, in addition to the

initial OK to enable the macro, it asks to enable the macros of WB A as
well.
To sum up, if I look into the project part on VB, I can see the two WBs,

each of them has got his own module to operate the macro, but WB B needs WB
A to run it.

Where am I wrong?

Thanks for your help
Alex



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Macro - Doesn't work in dedicate module

Hi,

Hi solved the problem.
Although the module was included in the WB, I forgot to change the reference in the buttons I created.
Now it works perfectly.

Thank you
Alex

"Vasant Nanavati" wrote:

Perhaps the macro makes specific references to WB A? If you post the macro
it would be easier to diagnose the problem.

--

Vasant

"Metallo" wrote in message
...
Hi,

I made a macro related to a WB that in this example we can call "WB A".

Then, I had another WB, that here we call "WB B" with the same format as

WB A, therefore I thought it was a good idea to apply the same macro as WB A
to give a different formatting.

I opened WB A and WB B, copied the macro from the Module of WB A, expanded

WB B, inserted a Module and copied the code.
Tried, it works!

Where's the issue?
The issue is that when I open WB B and run the macro, in addition to the

initial OK to enable the macro, it asks to enable the macros of WB A as
well.
To sum up, if I look into the project part on VB, I can see the two WBs,

each of them has got his own module to operate the macro, but WB B needs WB
A to run it.

Where am I wrong?

Thanks for your help
Alex




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
How does a module of VB work in a Worksheet? VJ Sharma[_2_] Excel Worksheet Functions 1 April 30th 09 04:15 PM
Which macro module wal50 Excel Discussion (Misc queries) 4 March 17th 09 07:46 PM
macro to standard module Simon Excel Discussion (Misc queries) 9 May 17th 07 08:25 PM
When open an old xls, an new macro is in a new module. Tom Ogilvy Excel Programming 0 February 13th 04 12:57 PM
protect module and work in activeworkbook Mark[_17_] Excel Programming 3 September 28th 03 10:43 PM


All times are GMT +1. The time now is 05:15 PM.

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"