ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Module runs twice (https://www.excelbanter.com/excel-programming/316652-module-runs-twice.html)

samjaynes[_3_]

Module runs twice
 

I created a module and made it an add-in. If I run the code directl
from the visual basic editor, it runs just fine. If I create
customized menu option and assign the macro/sub to it (for example
ADO_UpdateDB() ) it runs through the code completely -twice-.

I am wondering what is causing it to run twice????

Any assistance would be appreciated

--
samjayne
-----------------------------------------------------------------------
samjaynes's Profile: http://www.excelforum.com/member.php...fo&userid=1627
View this thread: http://www.excelforum.com/showthread.php?threadid=27786


Jim Thomlinson[_3_]

Module runs twice
 
There are any number of reasons for this. Often It has to do with a recursive
call, but without seeing your code I can't tell. Are there any event triggers
such as on_change or such. They are a good place to start looking...

"samjaynes" wrote:


I created a module and made it an add-in. If I run the code directly
from the visual basic editor, it runs just fine. If I create a
customized menu option and assign the macro/sub to it (for example:
ADO_UpdateDB() ) it runs through the code completely -twice-.

I am wondering what is causing it to run twice????

Any assistance would be appreciated.


--
samjaynes
------------------------------------------------------------------------
samjaynes's Profile: http://www.excelforum.com/member.php...o&userid=16277
View this thread: http://www.excelforum.com/showthread...hreadid=277861




All times are GMT +1. The time now is 02:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com