View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Richard Richard is offline
external usenet poster
 
Posts: 709
Default Remove and Import Module

I need to replace a module in selected workbooks with a module having the
same name.

I'm using the Remove method of the VBComponents collection to remove the
module.

I'm also using the Import method to import a module from a *.bas file.

The problem is:

....the module isn't 'removed' immediately following processing of the Remove
method, therefore, since a module with the same name still exists,

....when the Import processes, the new module is given the name with a '1' at
the end

....when processes ends...the 'removed' module is finally 'removed'

Is there a way to complete the Remove prior to the Import so that the
imported module will not have the '1' in the name?

Thanks,

--
Richard