Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
dynamically loading external macros, on the fly
I'm am trying to create somewhat of a scripting scheme so that the en user can format their reports, but not be limited to just what m scripting scheme offers. Basically, i want people who are not familia with the macro side of excel to still be able to do powerful things such as customization. In order to complete this project, i imagine i will need to load .ba files, or text files containing macros on the fly. If i have a directory called "\scripts", how can i run a text file i that directory as a macro? thanks, sp00 -- sp00ni ----------------------------------------------------------------------- sp00nix's Profile: http://www.excelforum.com/member.php...nfo&userid=393 View this thread: http://www.excelforum.com/showthread.php?threadid=52381 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
dynamically loading external macros, on the fly
From Chip Pearson's site - shows how to export to a text file, then import
into another workbook. Sub CopyOneModule() Dim FName As String With Workbooks("Book2") FName = .Path & "\code.txt" .VBProject.VBComponents("Module1").Export FName End With ' --- line your looking for --- Workbooks("book1").VBProject.VBComponents.Import FName End Sub http://www.cpearson.com/excel/vbe.htm -- Regards, Tom Ogilvy "sp00nix" wrote in message ... I'm am trying to create somewhat of a scripting scheme so that the end user can format their reports, but not be limited to just what my scripting scheme offers. Basically, i want people who are not familiar with the macro side of excel to still be able to do powerful things, such as customization. In order to complete this project, i imagine i will need to load .bas files, or text files containing macros on the fly. If i have a directory called "\scripts", how can i run a text file in that directory as a macro? thanks, sp00n -- sp00nix ------------------------------------------------------------------------ sp00nix's Profile: http://www.excelforum.com/member.php...fo&userid=3934 View this thread: http://www.excelforum.com/showthread...hreadid=523810 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
dynamically loading external macros, on the fly
thanks to -- sp00ni ----------------------------------------------------------------------- sp00nix's Profile: http://www.excelforum.com/member.php...nfo&userid=393 View this thread: http://www.excelforum.com/showthread.php?threadid=52381 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dynamically Loading Macro with data | Charts and Charting in Excel | |||
Disable Macros when loading a Workbook in Excel 2000 | Excel Programming | |||
Printing subset of pages dynamically using excel macros | Excel Discussion (Misc queries) | |||
External SQL Data not updating in spreadsheet when loading in OWC | Excel Programming | |||
Macros loading under XL2003 | Excel Programming |