Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default XL2003 - ThisWorkbook.VBProject.VBComponents("ThisWorkbook" ).CodeModule

I have the following code that removes some lines from "ThisWorkbook". This
seems to work fine from Excel 2000 and Excel 2002. However, it does not
seem to work from Excel 2003. Is there any reason why this wouldn't work on
Excell 2003 or later?

Set CodeMod =
ThisWorkbook.VBProject.VBComponents("ThisWorkbook" ).CodeModule
With CodeMod
StartLine = .ProcStartLine("Workbook_Open", vbext_pk_Proc)
ProcLen = .ProcCountLines("Workbook_Open", vbext_pk_Proc)
.DeleteLines StartLine, ProcLen
End With


Thanks in advance,
Paul




Reply
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
XL2003 - ThisWorkbook.VBProject.VBComponents("ThisWorkbook").CodeM JLGWhiz Excel Programming 0 January 12th 09 07:27 PM
ThisWorkbook.VBProject.References bluegrassstateworker Excel Programming 1 January 3rd 08 08:20 PM
How to use VBA to copy this code to "thisworkbook" objects of all opened workbooks ? Amolin[_2_] Excel Programming 5 June 3rd 05 08:34 AM
?thisworkbook.VBComponents(5).Type returns 2 [email protected][_2_] Excel Programming 1 December 13th 04 06:13 PM


All times are GMT +1. The time now is 12:28 PM.

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"