LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Method VBProject of object Workbook Failed

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Method "Method 'Open' of object 'Workbooks' failed [email protected] Excel Programming 2 June 2nd 10 05:28 PM
Method ‘Add’ of object ‘CommandbarControls’ failed sgltaylor Excel Programming 1 August 22nd 08 02:31 AM
Urgent help Runtime error ‘1004’ Method ‘SaveAs’ of object’-Workbook’ failed ????? funkymonkUK[_155_] Excel Programming 4 May 4th 06 12:56 PM
method vbproject of object workbook fail Chrispy[_2_] Excel Programming 4 January 9th 04 06:56 AM
Method ~ of Object ~ Failed. Joan Excel Programming 5 August 26th 03 08:13 PM


All times are GMT +1. The time now is 08:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"