Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Import module then run code not working.

For some reason this isn't working and it's driving me crazy...

I have a module called updater. Inside this module I have a blank sub called
runUpdates. I have to have a blank sub when the program starts or it throws
an error.

Sub runUpdates()

End Sub

I have a different module and sub that is supposed to remove updater, then
import the new updater with the sub runUpdates filled with code to update
the changes needed. The code is:

Sub checkUpdates()
'code is here to check version number and see if an update is available,
if so then update = true.

If update Then
removeUpdater 'this removes the module updater
importUpdater 'this imports the new updater
runUpdates 'this is to run the code for updating the workbook
End If

End Sub

The problem is that Excel seems to have stored the blank sub runUpdates to
memory and then executing this instead of the new runUpdates.
So now, if I run checkUpdates again, it thinks it already updated. Also, if
another new version is released and I run checkUpdates again, it will now run
the code from the previous update, not the new update.

I hope some of this makes sense.

Please Help. Thanks,

R
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
Import External Data Module xlsNewbie New Users to Excel 1 June 4th 09 07:29 AM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
Import module in protected project? [email protected] Excel Programming 0 January 5th 05 07:38 PM
Import useerfom, module in .xlt Raymond[_7_] Excel Programming 0 January 21st 04 01:00 PM
Import module with vba sandy98 Excel Programming 2 November 13th 03 03:18 PM


All times are GMT +1. The time now is 03:01 PM.

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"