Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy module across excel spreadsheets
Hi , I was trying to copy one module from an excel spreadsheet to anothe and searched google for information and found this piece of code: With ThisWorkbook FName = .Path & "\code.txt" .VBProject.VBComponents("Module2").Export FName End With Workbooks("Data.xls").VBProject.VBComponents.Impor t FName Kill FName End Sub I tried this piece and it works fine. The issue I have is I would lik to change the excel spreadsheet name dynamically , for example i wan Workbooks("Data.xls") the "Data.xls" to be dynamic. Because I have piece of macro which I want to copy across 100 other exce spreadsheets. Please guide me. Thanks, Gargya -- Gargy ----------------------------------------------------------------------- Gargya's Profile: http://www.excelforum.com/member.php...fo&userid=2659 View this thread: http://www.excelforum.com/showthread.php?threadid=39871 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy vb module in all excel sheets | Excel Discussion (Misc queries) | |||
How do I copy a new module to 200 workbooks with a macro? | Excel Worksheet Functions | |||
Copy a code module | Excel Programming | |||
Copy module with code - amendment | Excel Programming | |||
Is it possible to copy a code module using VBA? | Excel Programming |