LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Importing a macro programatically

I have a conundrum. My application loads a csv file into excel and does
some bits and bobs to it. In doing so it imports a macro from a text
file runs the code and exports it again That works fine. However it
does this before displaying the data sheet.

What I want to do is to import some code which will remain active and
allow the user to interact once it is loaded. I also import a worksheet
as a summary page during the process and have tried importing a macro
with this. This imports but the scope of the macro is such that I
cannot use it to manipulate another sheet.

If I use an add-in I would need to reference the addin in teh
workbook. The workbook is created new each time and so this wouldn't
work. Can I make a macro in a worksheet become public?

COuld I move it programatically to the other sheet I need to use it in?
The application cunningly removes all extraneous modules added as it is
working so even if I could add a new module it would get removed.

Could I add a procedure to the existing module? It is a complex issue
and I hope I have made it clear. I am limited by the way the
application works and cannot re-write that as it would upset everything
else!
John Robinson

 
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
Programatically adding macro to Excel - "ThisWorkbook" Aerojade Excel Discussion (Misc queries) 3 October 1st 08 12:53 PM
importing data using a macro chris_rip Excel Discussion (Misc queries) 0 July 18th 05 08:42 PM
Add/Run macro programatically OLE error Woody[_3_] Excel Programming 7 June 16th 05 04:14 PM
Problem when programatically importing cell that contain numbers and text Trond Hindenes Excel Programming 1 December 17th 04 08:28 PM
Deleting macro code programatically Terry Lowe[_3_] Excel Programming 1 September 1st 04 02:30 AM


All times are GMT +1. The time now is 12:06 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"