Visual Basic (VB and VBA)

Copyright 1999-2001 Christopher Greaves. All rights reserved.
Home Page and email to [email protected]
If in doubt, record a macro and inspect the entrails!

 

 

Please read the DISCLAIMER.

Here is an INDEX to all the procedures.

You will probably need one copy of my GLOBAL DECLARATIONS.



Public Function lngAddModule(strDoc As String, strModule As String) As String
' Procedure :   lngAddModule
' Description:  Add a module to the document.
' By:           Chris Greaves -  August 1999
' Inputs:       A document name and a module name,
' Action:       Create an empty module in the document.
' Returns:      The new count of modules.
' Assumes:      The document is open and the module does not exist.
' Side Effects: None.
' Tested:       by the calls shown below.
'Procs   Dim strNewModule As String
   Documents(strDoc).VBProject.VBComponents.Add(vbext_ct_StdModule).Name = strModule
   lngAddModule = Documents(strDoc).VBProject.VBComponents.Count
'Private Sub TESTstrAddModule()
'MsgBox lngAddModule(ActiveDocument.Name, "mod2")
'End Sub
End Function

We all knew nothing when we started …
Home Page and Contact Information
Send email to [email protected].
This page was last updated Thursday, November 15, 2001

 

 

Hosted by www.Geocities.ws

1

Visual Basic (VB and VBA)

Copyright 1999-2001 Christopher Greaves. All rights reserved.
Home Page and email to [email protected]
If in doubt, record a macro and inspect the entrails!

 

 

Please read the DISCLAIMER.

Here is an INDEX to all the procedures.

You will probably need one copy of my GLOBAL DECLARATIONS.

Public Function lngAddModule(strDoc As String, strModule As String) As String
' Procedure :   lngAddModule
' Description:  Add a module to the document.
' By:           Chris Greaves -  August 1999
' Inputs:       A document name and a module name,
' Action:       Create an empty module in the document.
' Returns:      The new count of modules.
' Assumes:      The document is open and the module does not exist.
' Side Effects: None.
' Tested:       by the calls shown below.
'Procs   Dim strNewModule As String
   Documents(strDoc).VBProject.VBComponents.Add(vbext_ct_StdModule).Name = strModule
   lngAddModule = Documents(strDoc).VBProject.VBComponents.Count
'Private Sub TESTstrAddModule()
'MsgBox lngAddModule(ActiveDocument.Name, "mod2")
'End Sub
End Function

We all knew nothing when we started …
Home Page and Contact Information
Send email to [email protected].
This page was last updated Thursday, November 15, 2001

 

 

Hosted by www.Geocities.ws

1