Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem with vbext_pk_Proc


I am having trouble running the following (CPearson's) code.

Sub ListProcedures()
Dim VBCodeMod As CodeModule
Dim StartLine As Long
Dim Msg As String
Dim ProcName As String
Set VBCodeMod
ThisWorkbook.VBProject.VBComponents("SaveModule"). CodeModule
With VBCodeMod
StartLine = .CountOfDeclarationLines + 1
Do Until StartLine = .CountOfLines
Msg = Msg & .ProcOfLine(StartLine, *vbext_pk_Proc*) & Chr(13)
StartLine = StartLine + _
.ProcCountLines(.ProcOfLine(StartLine, _
*vbext_pk_Proc), * *vbext_pk_Proc*)
Loop
End With
MsgBox Msg
End Sub

Excel balks at vbext_pk_Proc. In the past, when some such problem wa
encountered, I squirmed out of trouble by using the numerical constan
values - as in using 1 for vbext_ct_stdModule, 100 fo
vbext_ct_document etc. The Help files do not seem to give the numeri
constant for vbext_pk_Proc. Any help will be appreciated

--
david
-----------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064
View this thread: http://www.excelforum.com/showthread.php?threadid=39028

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Problem with vbext_pk_Proc

In tools=references in the VBE, create a reference to the Microsoft Visual
Basic Extensibility library. I believe this is stated at the top of Mr.
Pearson's web page.

--
Regards,
Tom Ogilvy

"davidm" wrote in
message ...

I am having trouble running the following (CPearson's) code.

Sub ListProcedures()
Dim VBCodeMod As CodeModule
Dim StartLine As Long
Dim Msg As String
Dim ProcName As String
Set VBCodeMod =
ThisWorkbook.VBProject.VBComponents("SaveModule"). CodeModule
With VBCodeMod
StartLine = .CountOfDeclarationLines + 1
Do Until StartLine = .CountOfLines
Msg = Msg & .ProcOfLine(StartLine, *vbext_pk_Proc*) & Chr(13)
StartLine = StartLine + _
ProcCountLines(.ProcOfLine(StartLine, _
*vbext_pk_Proc), * *vbext_pk_Proc*)
Loop
End With
MsgBox Msg
End Sub

Excel balks at vbext_pk_Proc. In the past, when some such problem was
encountered, I squirmed out of trouble by using the numerical constant
values - as in using 1 for vbext_ct_stdModule, 100 for
vbext_ct_document etc. The Help files do not seem to give the numeric
constant for vbext_pk_Proc. Any help will be appreciated.


--
davidm
------------------------------------------------------------------------
davidm's Profile:

http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=390287



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Problem with vbext_pk_Proc

Try setting a reference (Tools - Reference) to the Microsoft Visual Basic
for Extensibility Library. Hit F2 for the object browser and you can search
or browse through the constant definitions. In the object browser, choose
VBIDE as the library and look for vbext_ProcKind as the Type.

It's zero, by the way.


--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com


davidm wrote:
I am having trouble running the following (CPearson's) code.

Sub ListProcedures()
Dim VBCodeMod As CodeModule
Dim StartLine As Long
Dim Msg As String
Dim ProcName As String
Set VBCodeMod =
ThisWorkbook.VBProject.VBComponents("SaveModule"). CodeModule
With VBCodeMod
StartLine = .CountOfDeclarationLines + 1
Do Until StartLine = .CountOfLines
Msg = Msg & .ProcOfLine(StartLine, *vbext_pk_Proc*) & Chr(13)
StartLine = StartLine + _
ProcCountLines(.ProcOfLine(StartLine, _
*vbext_pk_Proc), * *vbext_pk_Proc*)
Loop
End With
MsgBox Msg
End Sub

Excel balks at vbext_pk_Proc. In the past, when some such problem was
encountered, I squirmed out of trouble by using the numerical constant
values - as in using 1 for vbext_ct_stdModule, 100 for
vbext_ct_document etc. The Help files do not seem to give the numeric
constant for vbext_pk_Proc. Any help will be appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem with vbext_pk_Proc


Many thanks Tom and Dick. I am home and hosed; it's working now

--
david
-----------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064
View this thread: http://www.excelforum.com/showthread.php?threadid=39028

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
Colon at the end of excel file name(ex: problem.xls:1, problem.xls financeguy New Users to Excel 2 January 15th 10 01:15 AM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
problem with a conditional max problem Brian Cornejo Excel Discussion (Misc queries) 1 February 18th 05 06:25 PM
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? OCI Excel Programming 0 May 16th 04 10:40 PM


All times are GMT +1. The time now is 12:16 AM.

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

About Us

"It's about Microsoft Excel"