Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Import Module weirdness

Hi -

I've created a "patch" tool to update a complex workbook used by approx 50 people. Among many other things, the patch updates several macros (using Chip Pearson's fabulous "Copy A Module" code, http://www.cpearson.com/excel/vbe.aspx) and then re-attached macros using the .OnAction command. There are 6 modules updated and close to 250 macros re-attached.

The problem is, on 2 of the re-attaches ... the assigned-macro ends up being linked to the patch file and not the macro within the tool. For example:

the assigned macro should be: UpdateSalesHours
but instead shows as: 'Patch 02-083116_NEW.xlsm'!UpdateSalesHours

None of the other 200+ re-attaches does this ... why does this one?

I've tried replacing the modules in different orders, doing the re-attaches in different orders ... no change.

Any idea what would cause this? and more importantly, how to fix it?

Thanks in advance,
Ray
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Import Module weirdness

Upon further investigation, the problem seems to be that the macro is being re-assigned to a Button (from MS Forms) vs shapes in the other cases.

Do Buttons behave differently in this case? or is this just coincidence?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Import Module weirdness

I've created a "patch" tool to update a complex workbook used by
approx 50 people. Among many other things, the patch updates several
macros (using Chip Pearson's fabulous "Copy A Module" code,
http://www.cpearson.com/excel/vbe.aspx) and then re-attached macros
using the .OnAction command. There are 6 modules updated and close
to 250 macros re-attached.


If you have that many users of your project...

Just curious why you don't use a core xla that uses a macro-free xlt so
all you have to do is distribute a new version? The xla can configure
Excel to use your own custom menus/toolbars or RibbonTab. All you need
to do is email users a download link for the latest release! **Way less
maintenance for you since the functionality is tested before release to
be reliably/securely working.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

  #4   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Import Module weirdness

Hi Garry, thanks for the response ...

Funny that you mention that, as I learned just recently that I could just such a thing -- house the contents and macros in 2 separate files! I'm not sure how to build such a tool ... can you suggest online resources to use?

The tool that I'm updating now is firmly entrenched and re-configuring to a more efficient setup isn't an option at this point ...
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Import Module weirdness

Hi Garry, thanks for the response ...

Funny that you mention that, as I learned just recently that I could
just such a thing -- house the contents and macros in 2 separate
files! I'm not sure how to build such a tool ... can you suggest
online resources to use?

The tool that I'm updating now is firmly entrenched and
re-configuring to a more efficient setup isn't an option at this
point ...


I'd have to see your project (hands on) to see how to go.
Unfortunately, converting a 'glorified' workbook to an addin *does
require* redesigning your project. This book will be a good place to
start...

http://www.appspro.com/Books/Books.htm

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



  #6   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Import Module weirdness

Thanks very much, Garry!
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 module Charlotte E[_2_] Excel Programming 9 July 5th 11 11:04 PM
Xml data import weirdness Donal McWeeney Excel Programming 8 May 28th 07 06:16 AM
Import Module to New Workbook Z-Excel Excel Programming 0 January 18th 07 12:43 AM
Import Module [email protected] Excel Programming 0 August 7th 06 09:11 PM
Import module with vba sandy98 Excel Programming 2 November 13th 03 04:18 PM


All times are GMT +1. The time now is 11:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"