G
Gargya
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.Import 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
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.Import 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