View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default After module import, code does not work

Is it necessary to load a module? If its just the code that you need to run,
it doesn't need to be in the same book - you can save it separately as an xla
and use it whenever required


"James" wrote:

I have a wb that loads in an external module from another workbook on click
of a button. It then automatically make some changes to the sheets and saves
this workbook as a different filename. Eveything works great untill I execute
the workbook_sheetselectionchange event and try to call MyModule.Thismacro
(which was imported).

If I go into the workbook_sheetselectionchange event and delete the line and
retype it exactly, it works fine!?!?! Anyone know what is going on here?

Any ideas about how to research this or fix would be great. Id like to try
and stay away from writing code to write code in thisworkbook because there
is a good amount. Thanks