By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,504 Members | 2,596 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,504 IT Pros & Developers. It's quick & easy.

Parse VB/VBA Code

P: n/a
Hello

How easily parse VB/VBA code by VB/VBA code ?
Is any ready solutions ?

Thank's,
illya
Nov 12 '05 #1
Share this Question
Share on Google+
22 Replies


P: n/a
On Sun, 12 Oct 2003 11:47:26 +0300, "Illya Havsiyevych"
<ga***@ukr.net> wrote:

Perhaps you are referring to the Eval function?
-Tom.

Hello

How easily parse VB/VBA code by VB/VBA code ?
Is any ready solutions ?

Thank's,
illya


Nov 12 '05 #2

P: n/a
TC
What are you trying to achieve?

TC
"Illya Havsiyevych" <ga***@ukr.net> wrote in message
news:bm***********@news.wnet.ua...
Hello

How easily parse VB/VBA code by VB/VBA code ?
Is any ready solutions ?

Thank's,
illya


Nov 12 '05 #3

P: n/a
hi

I'm trying to parse VBA code like compiler do
Than export function/sub declaration (aka prototype) to xml together with
comments to be ready to auto generate HTML help files for VBA/VB code
modules.

For now I'm using all functions from VBIDE.CodeModule Object.
Have some progress. Can send current

illya

"TC" <a@b.c.d> wrote in message news:1066039150.717984@teuthos...
What are you trying to achieve?

TC
"Illya Havsiyevych" <ga***@ukr.net> wrote in message
news:bm***********@news.wnet.ua...
Hello

How easily parse VB/VBA code by VB/VBA code ?
Is any ready solutions ?

Thank's,
illya


Nov 12 '05 #4

P: n/a
I have just done some research on this subject, and it turns out that to do
it right, you need to buy a license for VBA integration. This is the only
way to get the DLLs that give you access to the same information that
AutoSense has. Without that, you can theoretically do what you want (as
you have started to do), but it's up to you to pares everything correctly
such determining as what's a comment (did you know a comment can line-wrap
with " _"?). Also, if you want to know where a reference such as a
function call is resolved (other UDF, external library, VB key word, etc.)
....

I haven't checked the price on the VBA integration license yet, but I
assume it's not cheap.

On Mon, 13 Oct 2003 19:07:40 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
hi

I'm trying to parse VBA code like compiler do
Than export function/sub declaration (aka prototype) to xml together with
comments to be ready to auto generate HTML help files for VBA/VB code
modules.

For now I'm using all functions from VBIDE.CodeModule Object.
Have some progress. Can send current

illya

"TC" <a@b.c.d> wrote in message news:1066039150.717984@teuthos...
What are you trying to achieve?

TC
"Illya Havsiyevych" <ga***@ukr.net> wrote in message
news:bm***********@news.wnet.ua...
> Hello
>
> How easily parse VB/VBA code by VB/VBA code ?
> Is any ready solutions ?
>
> Thank's,
> illya



Nov 12 '05 #5

P: n/a
Hello

Thank You for Your comments.
But I'm not going to buy this license.
Also I'm not going to parse all code -
just procedure declarations block with previous attached comments
to export them into XML and then auto generate HTML help :)

'_' is not a problem just need to find <space>_

A lot of function from VBIDE.CodeModule are used

I'm using some my own spec for comments and I'm parsing code according to my
spec by using only VBA code.
Format
=====
<Comments>
<Property?Function?Sub Declaration>

Comments
========
'Context ID: value

'Desc Line 1

'Desc Line 2

'...

'Desc Line N

'

'Parameters:

'===========

'Param 1 - one line desc

'Param 2 - one line desc

'...

'Param N - one line desc

'

'Return Values:

'==============

'value 1 - one line desc

'value 2 - one line desc

'...

'value N - one line desc

'

'Remarks:

'========

'Remarks Line 1

'Remarks Line 2

'...

'Remarks Line N
comments to comments
================
Each comment line start from ', No Rem is possible.
Empty Lines inside comments block are possible but ignored
No Mandatory
Words Context ID Parameters, Return Values, Remarks are reserved.
No comments at line where Parameters, Return Values, Remarks are possible.
Lines with '======== or '-------- are ignored.
Procedure Declaration
================
[Public|Private|Friend]
Property Get?Property Let?Property Set?Function?Sub
name ([ArgList]) [as ReturnType]


"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:28********************************@4ax.com...
I have just done some research on this subject, and it turns out that to do it right, you need to buy a license for VBA integration. This is the only
way to get the DLLs that give you access to the same information that
AutoSense has. Without that, you can theoretically do what you want (as
you have started to do), but it's up to you to pares everything correctly
such determining as what's a comment (did you know a comment can line-wrap
with " _"?). Also, if you want to know where a reference such as a
function call is resolved (other UDF, external library, VB key word, etc.)
...

I haven't checked the price on the VBA integration license yet, but I
assume it's not cheap.

On Mon, 13 Oct 2003 19:07:40 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
hi

I'm trying to parse VBA code like compiler do
Than export function/sub declaration (aka prototype) to xml together with
comments to be ready to auto generate HTML help files for VBA/VB code
modules.

For now I'm using all functions from VBIDE.CodeModule Object.
Have some progress. Can send current

illya

"TC" <a@b.c.d> wrote in message news:1066039150.717984@teuthos...
What are you trying to achieve?

TC
"Illya Havsiyevych" <ga***@ukr.net> wrote in message
news:bm***********@news.wnet.ua...
> Hello
>
> How easily parse VB/VBA code by VB/VBA code ?
> Is any ready solutions ?
>
> Thank's,
> illya



Nov 12 '05 #6

P: n/a
On Mon, 13 Oct 2003 20:42:22 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
Hello

Thank You for Your comments.
But I'm not going to buy this license.
Also I'm not going to parse all code -
just procedure declarations block with previous attached comments
to export them into XML and then auto generate HTML help :)

'_' is not a problem just need to find <space>_


Well, I brought this up as one example of something that you might not know
and get wrong that the integration components would handle correctly. I'm
sure there are other strange cases that neither you or I are aware of, and
these will result in bugs the first time your code encounters them. Still,
I'm sure you can probably get close enough for most code just parsing the
text. VBIDE does (as I'm guessing you know) get you as far as telling you
where the code for each procedure starts and ends which is a big help.

Nov 12 '05 #7

P: n/a
If I may ask, sir. Where does VBIDE.CodeModule come from?
"Illya Havsiyevych" <ga***@ukr.net> wrote in message
news:bm***********@news.wnet.ua...
Hello

Thank You for Your comments.
But I'm not going to buy this license.
Also I'm not going to parse all code -
just procedure declarations block with previous attached comments
to export them into XML and then auto generate HTML help :)

'_' is not a problem just need to find <space>_

A lot of function from VBIDE.CodeModule are used

I'm using some my own spec for comments and I'm parsing code according to my spec by using only VBA code.
Format
=====
<Comments>
<Property?Function?Sub Declaration>

Comments
========
'Context ID: value

'Desc Line 1

'Desc Line 2

'...

'Desc Line N

'

'Parameters:

'===========

'Param 1 - one line desc

'Param 2 - one line desc

'...

'Param N - one line desc

'

'Return Values:

'==============

'value 1 - one line desc

'value 2 - one line desc

'...

'value N - one line desc

'

'Remarks:

'========

'Remarks Line 1

'Remarks Line 2

'...

'Remarks Line N
comments to comments
================
Each comment line start from ', No Rem is possible.
Empty Lines inside comments block are possible but ignored
No Mandatory
Words Context ID Parameters, Return Values, Remarks are reserved.
No comments at line where Parameters, Return Values, Remarks are possible.
Lines with '======== or '-------- are ignored.
Procedure Declaration
================
[Public|Private|Friend]
Property Get?Property Let?Property Set?Function?Sub
name ([ArgList]) [as ReturnType]


"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:28********************************@4ax.com...
I have just done some research on this subject, and it turns out that to
do
it right, you need to buy a license for VBA integration. This is the

only way to get the DLLs that give you access to the same information that
AutoSense has. Without that, you can theoretically do what you want (as
you have started to do), but it's up to you to pares everything correctly such determining as what's a comment (did you know a comment can line-wrap with " _"?). Also, if you want to know where a reference such as a
function call is resolved (other UDF, external library, VB key word, etc.) ...

I haven't checked the price on the VBA integration license yet, but I
assume it's not cheap.

On Mon, 13 Oct 2003 19:07:40 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
hi

I'm trying to parse VBA code like compiler do
Than export function/sub declaration (aka prototype) to xml together withcomments to be ready to auto generate HTML help files for VBA/VB code
modules.

For now I'm using all functions from VBIDE.CodeModule Object.
Have some progress. Can send current

illya

"TC" <a@b.c.d> wrote in message news:1066039150.717984@teuthos...
> What are you trying to achieve?
>
> TC
>
>
> "Illya Havsiyevych" <ga***@ukr.net> wrote in message
> news:bm***********@news.wnet.ua...
> > Hello
> >
> > How easily parse VB/VBA code by VB/VBA code ?
> > Is any ready solutions ?
> >
> > Thank's,
> > illya
>
>
>


Nov 12 '05 #8

P: n/a
It is installed with MS Office, and it appears under Tools -> References as
"Microsoft Visual Basic for Applications Extensibility 5.3. If you check
that reference, VBIDE references are available from your code.

On Mon, 13 Oct 2003 18:00:28 GMT, "Randy Harris" <ra***@SpamFree.com>
wrote:
If I may ask, sir. Where does VBIDE.CodeModule come from?


Nov 12 '05 #9

P: n/a
Hello
Yes, You are right here.
You can take a look into what I have
Of course If You wish

Thank's again
illya

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:a1********************************@4ax.com...
On Mon, 13 Oct 2003 20:42:22 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
Hello

Thank You for Your comments.
But I'm not going to buy this license.
Also I'm not going to parse all code -
just procedure declarations block with previous attached comments
to export them into XML and then auto generate HTML help :)

'_' is not a problem just need to find <space>_
Well, I brought this up as one example of something that you might not

know and get wrong that the integration components would handle correctly. I'm
sure there are other strange cases that neither you or I are aware of, and
these will result in bugs the first time your code encounters them. Still, I'm sure you can probably get close enough for most code just parsing the
text. VBIDE does (as I'm guessing you know) get you as far as telling you
where the code for each procedure starts and ends which is a big help.

Nov 12 '05 #10

P: n/a
I'm pleased you are willing to share your code, and I'm anxious to take a
look at it, but this group does not allow binary attachments. If you can
put this in a Web site, and post a link, that would be a better way of
generously sharing your code.

On Mon, 13 Oct 2003 21:50:01 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
this message also posted as
HTML Help Tool - Draft
==================
Hello All

Here is draft of HTML Help tool as Access AddIn
Tested with Access 2000, XP on Win2k and XP

Install
====
1) Put all from To_ProgramFiles_MicrosoftOffice_Office.zip
into c:\Program Files\Microsoft Office\Office

CTHELPPARSE.mde - VBA Code parse library
CTHELPXML.mde - XML create/parse library
CTUTIL.mde - utilities library
vbahelp.xsd - XML Scheme for output XML

2) Put all from To_AddIn.zip to Access AddIn Folder
I have it as c:\Documents and Settings\Administrator.COMP\Application
Data\Microsoft\AddIns

CTHELPADDIN.mde - Access AddIn

3) Start Access. GoTo Tools->Add-Ins->Add-In Manager
Install CTHELPADDIN AddIn

4) Open Any mdb maybe with comments like in Spec
and try to use AddIn

Format
=====
<Comments>
<Property/Function/Sub Declaration>

Comments
========
'Context ID: value
'Desc Line 1
'Desc Line 2
'...
'Desc Line N
'
'Parameters:
'===========
'Param 1 - one line desc
'Param 2 - one line desc
'...
'Param N - one line desc
'
'Return Values:
'==============
'value 1 - one line desc
'value 2 - one line desc
'...
'value N - one line desc
'
'Remarks:
'========
'Remarks Line 1
'Remarks Line 2
'...
'Remarks Line N

comments to comments
================
Each comment line start from ', No Rem is possible.
Empty Lines inside comments block are possible but ignored
No Mandatory
Words Context ID Parameters, Return Values, Remarks are reserved.
No comments at line where Parameters, Return Values, Remarks are possible.
Lines with '======== or '-------- are ignored.
Thanks
illya

"Illya Havsiyevych" <ga***@ukr.net> wrote in message
news:bm***********@news.wnet.ua...
Hello

Thank You for Your comments.
But I'm not going to buy this license.
Also I'm not going to parse all code -
just procedure declarations block with previous attached comments
to export them into XML and then auto generate HTML help :)

'_' is not a problem just need to find <space>_

A lot of function from VBIDE.CodeModule are used

I'm using some my own spec for comments and I'm parsing code according to

my
spec by using only VBA code.
Format
=====
<Comments>
<Property?Function?Sub Declaration>

Comments
========
'Context ID: value

'Desc Line 1

'Desc Line 2

'...

'Desc Line N

'

'Parameters:

'===========

'Param 1 - one line desc

'Param 2 - one line desc

'...

'Param N - one line desc

'

'Return Values:

'==============

'value 1 - one line desc

'value 2 - one line desc

'...

'value N - one line desc

'

'Remarks:

'========

'Remarks Line 1

'Remarks Line 2

'...

'Remarks Line N
comments to comments
================
Each comment line start from ', No Rem is possible.
Empty Lines inside comments block are possible but ignored
No Mandatory
Words Context ID Parameters, Return Values, Remarks are reserved.
No comments at line where Parameters, Return Values, Remarks are possible.
Lines with '======== or '-------- are ignored.
Procedure Declaration
================
[Public|Private|Friend]
Property Get?Property Let?Property Set?Function?Sub
name ([ArgList]) [as ReturnType]


"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:28********************************@4ax.com...
> I have just done some research on this subject, and it turns out that to

do
> it right, you need to buy a license for VBA integration. This is theonly > way to get the DLLs that give you access to the same information that
> AutoSense has. Without that, you can theoretically do what you want (as
> you have started to do), but it's up to you to pares everythingcorrectly > such determining as what's a comment (did you know a comment canline-wrap > with " _"?). Also, if you want to know where a reference such as a
> function call is resolved (other UDF, external library, VB key word,etc.) > ...
>
> I haven't checked the price on the VBA integration license yet, but I
> assume it's not cheap.
>
> On Mon, 13 Oct 2003 19:07:40 +0300, "Illya Havsiyevych" <ga***@ukr.net>
> wrote:
>
> >hi
> >
> >I'm trying to parse VBA code like compiler do
> >Than export function/sub declaration (aka prototype) to xml togetherwith > >comments to be ready to auto generate HTML help files for VBA/VB code
> >modules.
> >
> >For now I'm using all functions from VBIDE.CodeModule Object.
> >Have some progress. Can send current
> >
> >illya
> >
> >"TC" <a@b.c.d> wrote in message news:1066039150.717984@teuthos...
> >> What are you trying to achieve?
> >>
> >> TC
> >>
> >>
> >> "Illya Havsiyevych" <ga***@ukr.net> wrote in message
> >> news:bm***********@news.wnet.ua...
> >> > Hello
> >> >
> >> > How easily parse VB/VBA code by VB/VBA code ?
> >> > Is any ready solutions ?
> >> >
> >> > Thank's,
> >> > illya
> >>
> >>
> >>
> >
>




Nov 12 '05 #11

P: n/a
will try a little bit later
Do You know not very bad free hosting ?

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ht********************************@4ax.com...
I'm pleased you are willing to share your code, and I'm anxious to take a
look at it, but this group does not allow binary attachments. If you can
put this in a Web site, and post a link, that would be a better way of
generously sharing your code.

On Mon, 13 Oct 2003 21:50:01 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
this message also posted as
HTML Help Tool - Draft
==================
Hello All

Here is draft of HTML Help tool as Access AddIn
Tested with Access 2000, XP on Win2k and XP

Install
====
1) Put all from To_ProgramFiles_MicrosoftOffice_Office.zip
into c:\Program Files\Microsoft Office\Office

CTHELPPARSE.mde - VBA Code parse library
CTHELPXML.mde - XML create/parse library
CTUTIL.mde - utilities library
vbahelp.xsd - XML Scheme for output XML

2) Put all from To_AddIn.zip to Access AddIn Folder
I have it as c:\Documents and Settings\Administrator.COMP\Application
Data\Microsoft\AddIns

CTHELPADDIN.mde - Access AddIn

3) Start Access. GoTo Tools->Add-Ins->Add-In Manager
Install CTHELPADDIN AddIn

4) Open Any mdb maybe with comments like in Spec
and try to use AddIn

Format
=====
<Comments>
<Property/Function/Sub Declaration>

Comments
========
'Context ID: value
'Desc Line 1
'Desc Line 2
'...
'Desc Line N
'
'Parameters:
'===========
'Param 1 - one line desc
'Param 2 - one line desc
'...
'Param N - one line desc
'
'Return Values:
'==============
'value 1 - one line desc
'value 2 - one line desc
'...
'value N - one line desc
'
'Remarks:
'========
'Remarks Line 1
'Remarks Line 2
'...
'Remarks Line N

comments to comments
================
Each comment line start from ', No Rem is possible.
Empty Lines inside comments block are possible but ignored
No Mandatory
Words Context ID Parameters, Return Values, Remarks are reserved.
No comments at line where Parameters, Return Values, Remarks are possible.Lines with '======== or '-------- are ignored.
Thanks
illya

"Illya Havsiyevych" <ga***@ukr.net> wrote in message
news:bm***********@news.wnet.ua...
Hello

Thank You for Your comments.
But I'm not going to buy this license.
Also I'm not going to parse all code -
just procedure declarations block with previous attached comments
to export them into XML and then auto generate HTML help :)

'_' is not a problem just need to find <space>_

A lot of function from VBIDE.CodeModule are used

I'm using some my own spec for comments and I'm parsing code according to
my
spec by using only VBA code.
Format
=====
<Comments>
<Property?Function?Sub Declaration>

Comments
========
'Context ID: value

'Desc Line 1

'Desc Line 2

'...

'Desc Line N

'

'Parameters:

'===========

'Param 1 - one line desc

'Param 2 - one line desc

'...

'Param N - one line desc

'

'Return Values:

'==============

'value 1 - one line desc

'value 2 - one line desc

'...

'value N - one line desc

'

'Remarks:

'========

'Remarks Line 1

'Remarks Line 2

'...

'Remarks Line N
comments to comments
================
Each comment line start from ', No Rem is possible.
Empty Lines inside comments block are possible but ignored
No Mandatory
Words Context ID Parameters, Return Values, Remarks are reserved.
No comments at line where Parameters, Return Values, Remarks are

possible. Lines with '======== or '-------- are ignored.
Procedure Declaration
================
[Public|Private|Friend]
Property Get?Property Let?Property Set?Function?Sub
name ([ArgList]) [as ReturnType]


"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:28********************************@4ax.com...
> I have just done some research on this subject, and it turns out that to do
> it right, you need to buy a license for VBA integration. This is the

only
> way to get the DLLs that give you access to the same information that
> AutoSense has. Without that, you can theoretically do what you want (as > you have started to do), but it's up to you to pares everything

correctly
> such determining as what's a comment (did you know a comment can

line-wrap
> with " _"?). Also, if you want to know where a reference such as a
> function call is resolved (other UDF, external library, VB key word,

etc.)
> ...
>
> I haven't checked the price on the VBA integration license yet, but I
> assume it's not cheap.
>
> On Mon, 13 Oct 2003 19:07:40 +0300, "Illya Havsiyevych" <ga***@ukr.net> > wrote:
>
> >hi
> >
> >I'm trying to parse VBA code like compiler do
> >Than export function/sub declaration (aka prototype) to xml together

with
> >comments to be ready to auto generate HTML help files for VBA/VB code > >modules.
> >
> >For now I'm using all functions from VBIDE.CodeModule Object.
> >Have some progress. Can send current
> >
> >illya
> >
> >"TC" <a@b.c.d> wrote in message news:1066039150.717984@teuthos...
> >> What are you trying to achieve?
> >>
> >> TC
> >>
> >>
> >> "Illya Havsiyevych" <ga***@ukr.net> wrote in message
> >> news:bm***********@news.wnet.ua...
> >> > Hello
> >> >
> >> > How easily parse VB/VBA code by VB/VBA code ?
> >> > Is any ready solutions ?
> >> >
> >> > Thank's,
> >> > illya
> >>
> >>
> >>
> >
>


Nov 12 '05 #12

P: n/a
I'm not familliar with any free hosing, but most non-free internet accounts
come with a modest Web hosting space already in the deal. It's unually at
www.<your-provider>.com/~<yourusername>, and you can usually upload to it
by logging in to <yourusername>:<youremailpassword>@ftp.<yourprovid er>.com.

Or - if your code is under an open source license, you can host it for free
at sourceforge.net.

On Tue, 14 Oct 2003 11:21:25 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
will try a little bit later
Do You know not very bad free hosting ?

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ht********************************@4ax.com.. .
I'm pleased you are willing to share your code, and I'm anxious to take a
look at it, but this group does not allow binary attachments. If you can
put this in a Web site, and post a link, that would be a better way of
generously sharing your code.

On Mon, 13 Oct 2003 21:50:01 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
>this message also posted as
>HTML Help Tool - Draft
>==================
>
>
>Hello All
>
>Here is draft of HTML Help tool as Access AddIn
>Tested with Access 2000, XP on Win2k and XP
>
>Install
>====
>1) Put all from To_ProgramFiles_MicrosoftOffice_Office.zip
>into c:\Program Files\Microsoft Office\Office
>
>CTHELPPARSE.mde - VBA Code parse library
>CTHELPXML.mde - XML create/parse library
>CTUTIL.mde - utilities library
>vbahelp.xsd - XML Scheme for output XML
>
>2) Put all from To_AddIn.zip to Access AddIn Folder
>I have it as c:\Documents and Settings\Administrator.COMP\Application
>Data\Microsoft\AddIns
>
>CTHELPADDIN.mde - Access AddIn
>
>3) Start Access. GoTo Tools->Add-Ins->Add-In Manager
>Install CTHELPADDIN AddIn
>
>4) Open Any mdb maybe with comments like in Spec
>and try to use AddIn
>
>Format
>=====
><Comments>
><Property/Function/Sub Declaration>
>
>Comments
>========
>'Context ID: value
>'Desc Line 1
>'Desc Line 2
>'...
>'Desc Line N
>'
>'Parameters:
>'===========
>'Param 1 - one line desc
>'Param 2 - one line desc
>'...
>'Param N - one line desc
>'
>'Return Values:
>'==============
>'value 1 - one line desc
>'value 2 - one line desc
>'...
>'value N - one line desc
>'
>'Remarks:
>'========
>'Remarks Line 1
>'Remarks Line 2
>'...
>'Remarks Line N
>
>comments to comments
>================
>Each comment line start from ', No Rem is possible.
>Empty Lines inside comments block are possible but ignored
>No Mandatory
>Words Context ID Parameters, Return Values, Remarks are reserved.
>No comments at line where Parameters, Return Values, Remarks arepossible. >Lines with '======== or '-------- are ignored.
>
>
>Thanks
>illya
>
>"Illya Havsiyevych" <ga***@ukr.net> wrote in message
>news:bm***********@news.wnet.ua...
>> Hello
>>
>> Thank You for Your comments.
>> But I'm not going to buy this license.
>> Also I'm not going to parse all code -
>> just procedure declarations block with previous attached comments
>> to export them into XML and then auto generate HTML help :)
>>
>> '_' is not a problem just need to find <space>_
>>
>> A lot of function from VBIDE.CodeModule are used
>>
>> I'm using some my own spec for comments and I'm parsing code accordingto >my
>> spec by using only VBA code.
>>
>>
>> Format
>> =====
>> <Comments>
>> <Property?Function?Sub Declaration>
>>
>> Comments
>> ========
>> 'Context ID: value
>>
>> 'Desc Line 1
>>
>> 'Desc Line 2
>>
>> '...
>>
>> 'Desc Line N
>>
>> '
>>
>> 'Parameters:
>>
>> '===========
>>
>> 'Param 1 - one line desc
>>
>> 'Param 2 - one line desc
>>
>> '...
>>
>> 'Param N - one line desc
>>
>> '
>>
>> 'Return Values:
>>
>> '==============
>>
>> 'value 1 - one line desc
>>
>> 'value 2 - one line desc
>>
>> '...
>>
>> 'value N - one line desc
>>
>> '
>>
>> 'Remarks:
>>
>> '========
>>
>> 'Remarks Line 1
>>
>> 'Remarks Line 2
>>
>> '...
>>
>> 'Remarks Line N
>>
>>
>> comments to comments
>> ================
>> Each comment line start from ', No Rem is possible.
>> Empty Lines inside comments block are possible but ignored
>> No Mandatory
>> Words Context ID Parameters, Return Values, Remarks are reserved.
>> No comments at line where Parameters, Return Values, Remarks arepossible. >> Lines with '======== or '-------- are ignored.
>>
>>
>> Procedure Declaration
>> ================
>> [Public|Private|Friend]
>> Property Get?Property Let?Property Set?Function?Sub
>> name ([ArgList]) [as ReturnType]
>>
>>
>>
>>
>> "Steve Jorgensen" <no****@nospam.nospam> wrote in message
>> news:28********************************@4ax.com...
>> > I have just done some research on this subject, and it turns out thatto >> do
>> > it right, you need to buy a license for VBA integration. This is the
>only
>> > way to get the DLLs that give you access to the same information that
>> > AutoSense has. Without that, you can theoretically do what you want(as >> > you have started to do), but it's up to you to pares everything
>correctly
>> > such determining as what's a comment (did you know a comment can
>line-wrap
>> > with " _"?). Also, if you want to know where a reference such as a
>> > function call is resolved (other UDF, external library, VB key word,
>etc.)
>> > ...
>> >
>> > I haven't checked the price on the VBA integration license yet, but I
>> > assume it's not cheap.
>> >
>> > On Mon, 13 Oct 2003 19:07:40 +0300, "Illya Havsiyevych"<ga***@ukr.net> >> > wrote:
>> >
>> > >hi
>> > >
>> > >I'm trying to parse VBA code like compiler do
>> > >Than export function/sub declaration (aka prototype) to xml together
>with
>> > >comments to be ready to auto generate HTML help files for VBA/VBcode >> > >modules.
>> > >
>> > >For now I'm using all functions from VBIDE.CodeModule Object.
>> > >Have some progress. Can send current
>> > >
>> > >illya
>> > >
>> > >"TC" <a@b.c.d> wrote in message news:1066039150.717984@teuthos...
>> > >> What are you trying to achieve?
>> > >>
>> > >> TC
>> > >>
>> > >>
>> > >> "Illya Havsiyevych" <ga***@ukr.net> wrote in message
>> > >> news:bm***********@news.wnet.ua...
>> > >> > Hello
>> > >> >
>> > >> > How easily parse VB/VBA code by VB/VBA code ?
>> > >> > Is any ready solutions ?
>> > >> >
>> > >> > Thank's,
>> > >> > illya
>> > >>
>> > >>
>> > >>
>> > >
>> >
>>
>>
>>
>>
>
>


Nov 12 '05 #13

P: n/a
no****@nospam.nospam (Steve Jorgensen) wrote in
<hu********************************@4ax.com>:
I'm not familliar with any free hosing


I'll hose your code from free, Steve.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #14

P: n/a
http://www.brinkster.com

They provide free webhosting with 30MB of space.
Also, provide IIS/ASP resources.

I have found them to be a very useful resource.

- Jim

On Tue, 14 Oct 2003 11:21:25 +0300, "Illya Havsiyevych"
<ga***@ukr.net> wrote:
will try a little bit later
Do You know not very bad free hosting ?

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ht********************************@4ax.com.. .
I'm pleased you are willing to share your code, and I'm anxious to take a
look at it, but this group does not allow binary attachments. If you can
put this in a Web site, and post a link, that would be a better way of
generously sharing your code.

On Mon, 13 Oct 2003 21:50:01 +0300, "Illya Havsiyevych" <ga***@ukr.net>
wrote:
>this message also posted as
>HTML Help Tool - Draft
>==================
>
>
>Hello All
>
>Here is draft of HTML Help tool as Access AddIn
>Tested with Access 2000, XP on Win2k and XP
>
>Install
>====
>1) Put all from To_ProgramFiles_MicrosoftOffice_Office.zip
>into c:\Program Files\Microsoft Office\Office
>
>CTHELPPARSE.mde - VBA Code parse library
>CTHELPXML.mde - XML create/parse library
>CTUTIL.mde - utilities library
>vbahelp.xsd - XML Scheme for output XML
>
>2) Put all from To_AddIn.zip to Access AddIn Folder
>I have it as c:\Documents and Settings\Administrator.COMP\Application
>Data\Microsoft\AddIns
>
>CTHELPADDIN.mde - Access AddIn
>
>3) Start Access. GoTo Tools->Add-Ins->Add-In Manager
>Install CTHELPADDIN AddIn
>
>4) Open Any mdb maybe with comments like in Spec
>and try to use AddIn
>
>Format
>=====
><Comments>
><Property/Function/Sub Declaration>
>
>Comments
>========
>'Context ID: value
>'Desc Line 1
>'Desc Line 2
>'...
>'Desc Line N
>'
>'Parameters:
>'===========
>'Param 1 - one line desc
>'Param 2 - one line desc
>'...
>'Param N - one line desc
>'
>'Return Values:
>'==============
>'value 1 - one line desc
>'value 2 - one line desc
>'...
>'value N - one line desc
>'
>'Remarks:
>'========
>'Remarks Line 1
>'Remarks Line 2
>'...
>'Remarks Line N
>
>comments to comments
>================
>Each comment line start from ', No Rem is possible.
>Empty Lines inside comments block are possible but ignored
>No Mandatory
>Words Context ID Parameters, Return Values, Remarks are reserved.
>No comments at line where Parameters, Return Values, Remarks arepossible. >Lines with '======== or '-------- are ignored.
>
>
>Thanks
>illya
>
>"Illya Havsiyevych" <ga***@ukr.net> wrote in message
>news:bm***********@news.wnet.ua...
>> Hello
>>
>> Thank You for Your comments.
>> But I'm not going to buy this license.
>> Also I'm not going to parse all code -
>> just procedure declarations block with previous attached comments
>> to export them into XML and then auto generate HTML help :)
>>
>> '_' is not a problem just need to find <space>_
>>
>> A lot of function from VBIDE.CodeModule are used
>>
>> I'm using some my own spec for comments and I'm parsing code accordingto >my
>> spec by using only VBA code.
>>
>>
>> Format
>> =====
>> <Comments>
>> <Property?Function?Sub Declaration>
>>
>> Comments
>> ========
>> 'Context ID: value
>>
>> 'Desc Line 1
>>
>> 'Desc Line 2
>>
>> '...
>>
>> 'Desc Line N
>>
>> '
>>
>> 'Parameters:
>>
>> '===========
>>
>> 'Param 1 - one line desc
>>
>> 'Param 2 - one line desc
>>
>> '...
>>
>> 'Param N - one line desc
>>
>> '
>>
>> 'Return Values:
>>
>> '==============
>>
>> 'value 1 - one line desc
>>
>> 'value 2 - one line desc
>>
>> '...
>>
>> 'value N - one line desc
>>
>> '
>>
>> 'Remarks:
>>
>> '========
>>
>> 'Remarks Line 1
>>
>> 'Remarks Line 2
>>
>> '...
>>
>> 'Remarks Line N
>>
>>
>> comments to comments
>> ================
>> Each comment line start from ', No Rem is possible.
>> Empty Lines inside comments block are possible but ignored
>> No Mandatory
>> Words Context ID Parameters, Return Values, Remarks are reserved.
>> No comments at line where Parameters, Return Values, Remarks arepossible. >> Lines with '======== or '-------- are ignored.
>>
>>
>> Procedure Declaration
>> ================
>> [Public|Private|Friend]
>> Property Get?Property Let?Property Set?Function?Sub
>> name ([ArgList]) [as ReturnType]
>>
>>
>>
>>
>> "Steve Jorgensen" <no****@nospam.nospam> wrote in message
>> news:28********************************@4ax.com...
>> > I have just done some research on this subject, and it turns out thatto >> do
>> > it right, you need to buy a license for VBA integration. This is the
>only
>> > way to get the DLLs that give you access to the same information that
>> > AutoSense has. Without that, you can theoretically do what you want(as >> > you have started to do), but it's up to you to pares everything
>correctly
>> > such determining as what's a comment (did you know a comment can
>line-wrap
>> > with " _"?). Also, if you want to know where a reference such as a
>> > function call is resolved (other UDF, external library, VB key word,
>etc.)
>> > ...
>> >
>> > I haven't checked the price on the VBA integration license yet, but I
>> > assume it's not cheap.
>> >
>> > On Mon, 13 Oct 2003 19:07:40 +0300, "Illya Havsiyevych"<ga***@ukr.net> >> > wrote:
>> >
>> > >hi
>> > >
>> > >I'm trying to parse VBA code like compiler do
>> > >Than export function/sub declaration (aka prototype) to xml together
>with
>> > >comments to be ready to auto generate HTML help files for VBA/VBcode >> > >modules.
>> > >
>> > >For now I'm using all functions from VBIDE.CodeModule Object.
>> > >Have some progress. Can send current
>> > >
>> > >illya
>> > >
>> > >"TC" <a@b.c.d> wrote in message news:1066039150.717984@teuthos...
>> > >> What are you trying to achieve?
>> > >>
>> > >> TC
>> > >>
>> > >>
>> > >> "Illya Havsiyevych" <ga***@ukr.net> wrote in message
>> > >> news:bm***********@news.wnet.ua...
>> > >> > Hello
>> > >> >
>> > >> > How easily parse VB/VBA code by VB/VBA code ?
>> > >> > Is any ready solutions ?
>> > >> >
>> > >> > Thank's,
>> > >> > illya
>> > >>
>> > >>
>> > >>
>> > >
>> >
>>
>>
>>
>>
>
>



Nov 12 '05 #15

P: n/a
On Tue, 14 Oct 2003 20:02:59 GMT, dX********@bway.net.invalid (David W.
Fenton) wrote:
no****@nospam.nospam (Steve Jorgensen) wrote in
<hu********************************@4ax.com>:
I'm not familliar with any free hosing


I'll hose your code from free, Steve.


D.F.,

I really can't tell what your message is trying to say, but It's addressed
to me. Clarify?
Nov 12 '05 #16

P: n/a
TC

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:28********************************@4ax.com...
I have just done some research on this subject, and it turns out that to do it right, you need to buy a license for VBA integration. This is the only
way to get the DLLs that give you access to the same information that
AutoSense has. Without that, you can theoretically do what you want (as
you have started to do), but it's up to you to pares everything correctly
such determining as what's a comment (snip)

Steve, I thougt that VBA Integration was the process of taking your own
application - written in any language, storing data in any format - and
exposing its capabilities as objects, methods and properties that can be
used by any VBA client. Then, for example, you could automate your
application from any Office program. That is not what the OP is doing?

As for intellisense, I'm a bit out of my league here, but I think that the
data comes directly from the relevant type libraries (.tlb files or
whatever). I believe there are documented APIs for reading those files. So
it is just a metter of writing appropriate code, to get that data out.

Yes? No?

TC

Nov 12 '05 #17

P: n/a
On Wed, 15 Oct 2003 13:48:31 +1200, "TC" <a@b.c.d> wrote:

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:28********************************@4ax.com.. .
I have just done some research on this subject, and it turns out that todo
it right, you need to buy a license for VBA integration. This is the only
way to get the DLLs that give you access to the same information that
AutoSense has. Without that, you can theoretically do what you want (as
you have started to do), but it's up to you to pares everything correctly
such determining as what's a comment (snip)

Steve, I thougt that VBA Integration was the process of taking your own
application - written in any language, storing data in any format - and
exposing its capabilities as objects, methods and properties that can be
used by any VBA client. Then, for example, you could automate your
application from any Office program. That is not what the OP is doing?


There is a VBA integration license that gives you the files and licenses to
be able to integrate the VBA engine directly into your program just like
Access or Word does. Rather than just exposing objects in an OLE/ActiveX
compatible way for access by VB/VBA code running elsewhere, you actually
host the VBA platform from within the application. From what I can tell,
if you want access to the low-level information like what the VBE has with
autosense, you need the files that are only available with the purchase of
this license.
As for intellisense, I'm a bit out of my league here, but I think that the
data comes directly from the relevant type libraries (.tlb files or
whatever). I believe there are documented APIs for reading those files. So
it is just a metter of writing appropriate code, to get that data out.

Yes? No?
Almost. The data comes from a TLB-like structure, but a VBA project has no
TLB file to read data from. You can use Tlbinf32.dll to get the
InterfaceInfo object from an instance of an object wonce you have an
instance created in a running VBA program, and that's been very useful to
be in some odd cases, but that's as far as I've been able to get with this
approach.

I'll try to post a link back in this thread soon to a VBA unit tester I
wrote that makes use of the InterfaceInfo I spoke of in the preceding
paragraph.

TC


Nov 12 '05 #18

P: n/a
no****@nospam.nospam (Steve Jorgensen) wrote in
<qa********************************@4ax.com>:
On Tue, 14 Oct 2003 20:02:59 GMT, dX********@bway.net.invalid
(David W. Fenton) wrote:
no****@nospam.nospam (Steve Jorgensen) wrote in
<hu********************************@4ax.com>:
I'm not familliar with any free hosing


I'll hose your code from free, Steve.


D.F.,

I really can't tell what your message is trying to say, but It's
addressed to me. Clarify?


It's just a bad joke, based on your typo of "hosing" when you meant
"hosting."

<Emily Litella>
Never mind.
</Emily Litella>

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #19

P: n/a

"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.90.. .
no****@nospam.nospam (Steve Jorgensen) wrote in
<qa********************************@4ax.com>:
On Tue, 14 Oct 2003 20:02:59 GMT, dX********@bway.net.invalid
(David W. Fenton) wrote:
no****@nospam.nospam (Steve Jorgensen) wrote in
<hu********************************@4ax.com>:

I'm not familliar with any free hosing

I'll hose your code from free, Steve.


D.F.,

I really can't tell what your message is trying to say, but It's
addressed to me. Clarify?


It's just a bad joke, based on your typo of "hosing" when you meant
"hosting."

<Emily Litella>
Never mind.
</Emily Litella>

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc


If you remember Steve Jorgensen's Joke of the Day feature from a while back,
you will not be surprised to find he didn't get it. Have a look here:

http://groups.google.com/groups?hl=e...or&sa=N&tab=wg

Nov 12 '05 #20

P: n/a
On Wed, 15 Oct 2003 15:16:39 GMT, dX********@bway.net.invalid (David W.
Fenton) wrote:
no****@nospam.nospam (Steve Jorgensen) wrote in
<qa********************************@4ax.com>:
On Tue, 14 Oct 2003 20:02:59 GMT, dX********@bway.net.invalid
(David W. Fenton) wrote:
no****@nospam.nospam (Steve Jorgensen) wrote in
<hu********************************@4ax.com>:

I'm not familliar with any free hosing

I'll hose your code from free, Steve.


D.F.,

I really can't tell what your message is trying to say, but It's
addressed to me. Clarify?


It's just a bad joke, based on your typo of "hosing" when you meant
"hosting."


Thanks for clearing that up - I was confused. It would have been more
clear with "" around "hose" :)
Nov 12 '05 #21

P: n/a
rkc

"R. Soul" <so**@rest.com> wrote in message
news:bm**********@hercules.btinternet.com...

"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.90.. .
no****@nospam.nospam (Steve Jorgensen) wrote in
<qa********************************@4ax.com>:
On Tue, 14 Oct 2003 20:02:59 GMT, dX********@bway.net.invalid
(David W. Fenton) wrote:

>no****@nospam.nospam (Steve Jorgensen) wrote in
><hu********************************@4ax.com>:
>
>>I'm not familliar with any free hosing
>
>I'll hose your code from free, Steve.

D.F.,

I really can't tell what your message is trying to say, but It's
addressed to me. Clarify?
It's just a bad joke, based on your typo of "hosing" when you meant
"hosting."

<Emily Litella>
Never mind.
</Emily Litella>

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc


If you remember Steve Jorgensen's Joke of the Day feature from a while

back, you will not be surprised to find he didn't get it. Have a look here:


If you recall this thread you'll know why one would not expect to see D.W.
trying to be funny.

http://www.google.com/groups?q=+%22s....rr.com&rnum=3

Nov 12 '05 #22

P: n/a
TC
Thanks for the info.

TC
Steve Jorgensen <no****@nospam.nospam> wrote in message
news:ge********************************@4ax.com...
On Wed, 15 Oct 2003 13:48:31 +1200, "TC" <a@b.c.d> wrote:

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:28********************************@4ax.com.. .
I have just done some research on this subject, and it turns out that to
do
it right, you need to buy a license for VBA integration. This is the
only way to get the DLLs that give you access to the same information that
AutoSense has. Without that, you can theoretically do what you want (as you have started to do), but it's up to you to pares everything correctly such determining as what's a comment (snip)

Steve, I thougt that VBA Integration was the process of taking your own
application - written in any language, storing data in any format - and
exposing its capabilities as objects, methods and properties that can be
used by any VBA client. Then, for example, you could automate your
application from any Office program. That is not what the OP is doing?


There is a VBA integration license that gives you the files and licenses

to be able to integrate the VBA engine directly into your program just like
Access or Word does. Rather than just exposing objects in an OLE/ActiveX
compatible way for access by VB/VBA code running elsewhere, you actually
host the VBA platform from within the application. From what I can tell,
if you want access to the low-level information like what the VBE has with
autosense, you need the files that are only available with the purchase of
this license.
As for intellisense, I'm a bit out of my league here, but I think that
thedata comes directly from the relevant type libraries (.tlb files or
whatever). I believe there are documented APIs for reading those files. Soit is just a metter of writing appropriate code, to get that data out.

Yes? No?


Almost. The data comes from a TLB-like structure, but a VBA project has

no TLB file to read data from. You can use Tlbinf32.dll to get the
InterfaceInfo object from an instance of an object wonce you have an
instance created in a running VBA program, and that's been very useful to
be in some odd cases, but that's as far as I've been able to get with this
approach.

I'll try to post a link back in this thread soon to a VBA unit tester I
wrote that makes use of the InterfaceInfo I spoke of in the preceding
paragraph.

TC

Nov 12 '05 #23

This discussion thread is closed

Replies have been disabled for this discussion.