Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
yes, Id like to import the modules because they will be accessed alot when
the sheets are being used and the file is saved to another directory on a network. what i dont get is that if I simply retype the line "MyModule.Thismacro" , it works. thanks for the reply "Patrick Molloy" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there function that resets the code link to a module? (see below)
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA code in one Module referencing Public Variables Declared inanother Module failing | Excel Programming | |||
code in module A to not execute a Worksheet_SelectionChange sub of another module | Excel Discussion (Misc queries) | |||
Run worksheet module code from workbook module? | Excel Programming | |||
Import module then run code not working. | Excel Programming | |||
Import module with vba | Excel Programming |