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: 3,986
Default XL2003 - ThisWorkbook.VBProject.VBComponents("ThisWorkbook" ).CodeM

Could be a .dll reference problem. when I ran CodeModule in the VBA help
search box it gave me no results. However, when I ran it in the Object
Browser, it shows up under VBComponents with Parent VBIDE. I am running
xl2003.

"PCLIVE" wrote:

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





 
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
ThisWorkbook.VBProject.References bluegrassstateworker Excel Programming 1 January 3rd 08 08:20 PM
Can I disable a macro in "Thisworkbook" with true or false? Husker87 Excel Programming 7 February 17th 06 02:15 AM
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 10:02 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"