--
Posted via CNET Help.com
http://www.help.com/
I heard a rumour that if you changed the XL workbook extention, to say TXT
or PRN or CSV or something, you could use Word to import the file, clean it
up, and extract the code.
Pls let me know if this works.
--
Julian Milano
"Taysh" <Ta...@hotmail.com> wrote in message
news:sl034co...@corp.supernews.com...
Sub Recover_Excel_VBA_modules()
Dim XL As Excel.Application
Dim XLVBE As Object
Dim i As Integer, j As Integer
Set XL = New Excel.Application
XL.Workbooks.Open FileName:="h:\CR - Portfolio Template.xls"
Set XLVBE = XL.VBE
j = XLVBE.VBProjects(1).VBComponents.Count
For i = 1 To j
Debug.Print XLVBE.VBProjects(1).VBComponents(i).Name
XLVBE.VBProjects(1).VBComponents(i).Export FileName:="C:\temp\vbe_"
& (100 + i) & ".txt"
Next
XL.Quit
Set XL = Nothing
End Sub
Regards,
Andrew Baker
llaw <ll...@hciww.com> wrote in message news:#YUBUu32$GA.170@cppssbbsa05...
If anyone has any other ideas let me know.
Thanks again!