redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,592
- Office Version
- 365
- Platform
- Windows
Hi all
I have the following code that will ( I hope ) copy the Module1 from my current workbook to one called 'Book6'
is it possible to change the code so that Book6 becomes a text range of Monthly Report and then the cell ref of the Info sheet ref G2
So if Info / G2 holds Dec-15
becomes
many thanks
I have the following code that will ( I hope ) copy the Module1 from my current workbook to one called 'Book6'
Code:
Dim FName As String
With Workbooks("Template.xlsm")
FName = .Path & "code.txt"
.VBProject.VBComponents("Module1").Export FName
End With
Workbooks("Book6").VBProject.VBComponents.Import FName
is it possible to change the code so that Book6 becomes a text range of Monthly Report and then the cell ref of the Info sheet ref G2
So if Info / G2 holds Dec-15
Code:
Workbooks("Book6").VBProject.VBComponents.Import FName
Code:
Workbooks("Monthly Report Dec-15").VBProject.VBComponents.Import FName
many thanks