Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim VBComp As VBIDE.VBProject
For Each VBComp In ActiveWorkbook.VBProject.VBComponents Hi Guys, I got this code on this google group. and it work in my computer at home im using excel 2007. but here in the office im using excel 2003 and it doesnt work. im getting this " Activeworkbook.VBProject...=<Method'VbProject" of object'_Workbook'failed. Can anyone help me get through with this. Thanks much. Jeff With VBComp Select Case .Type Case vbext_ct_Document If .CodeModule < "Sheet1" And .CodeModule < "Sheet2" Then With .CodeModule .DeleteLines StartLine:=1, count:=.CountOfLines End With End If Case Else ActiveWorkbook.VBProject.VBComponents.Remove VBComp End Select End With Next VBComp |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Method "Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
Method ‘Add’ of object ‘CommandbarControls’ failed | Excel Programming | |||
Urgent help Runtime error ‘1004’ Method ‘SaveAs’ of object’-Workbook’ failed ????? | Excel Programming | |||
method vbproject of object workbook fail | Excel Programming | |||
Method ~ of Object ~ Failed. | Excel Programming |