Utility to trace vba process logic (1 Viewer)

jdraw

Super Moderator
Staff member
Local time
Today, 12:25
Joined
Jan 23, 2006
Messages
13,409
I'm interested in any samples or ideas related to tracing the (vba) processing/event logic. The background is, when receiving a database from a poster where there is little context for an issue and little to no documentation (perhaps the poster wasn't the developer and had database dropped on him/her), there can be a big learning curve with repeated posts to find out "what the database" is and/or how it works. I will often manually put conditional debug prints of the procedure/event to trace the processing steps. I was wondering if anyone had or was aware of any automated way to do this via code. In the old days, we would read source code (eg. DEC COBOL) and insert appropriate Display/Print statement(s) to assist debugging. I've done some "google-ing" but have had no success --I am aware of step debugging and breakpoints and the manual approach is workable but not optimal.
I recognize that such automaton would probably involve programming in the VBE. I have not done this and was looking for an existing utility, another approach or some starting base.
Thanks in advance for any info.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 12:25
Joined
May 21, 2018
Messages
3,685
I have installed Rubberduck http://rubberduckvba.com/ on my computer, and it may have some helpful utilities. I have just not played with it much to know what it can do.
 

The_Doc_Man

Immoderate Moderator, Former MVP, Retired SysAdmin
Staff member
Local time
Today, 11:25
Joined
Feb 28, 2001
Messages
18,393
I once wrote a program flow analyzer in another language on another system. It wasn't pretty. But with this COVID isolation, I might just get stir-crazy enough to try to resurrect it. Unfortunately, I have no copies of the code because it was Navy property so I would have to start from scratch.
 

Minty

AWF VIP
Local time
Today, 17:25
Joined
Jul 26, 2013
Messages
7,571
I tried the rubberduckvba thingy (admittedly a few years ago) and found it very buggy, I'd be intrigued to see if it's improved?
 

vba_php

Forum Troll
Local time
Today, 11:25
Joined
Oct 6, 2019
Messages
2,884
But with this COVID isolation, I might just get stir-crazy
a lot of people are suffering from that, richard. If you have God in your heart, that would never be an issue for you.

jdraw, have you ever used the VBA extensibility library? what it does is essentially write VBA code about the VBA code structure of an access application. so in other words, it allows you to write code about the vba code in the same IDE. in this case, the VBE. do you know what I'm talking about? it's in the references. it might be useful in a situation like this.
 

strive4peace

AWF VIP
Local time
Today, 11:25
Joined
Apr 3, 2020
Messages
571
Hi jdraw,

While it doesn't trace logic, I have a utility to document code and calculate some statistics about it.

Code Documenter
accessmvp.com/strive4peace/CodeDocumenter.htm

As for really seeing whats in a database though, I use this tool (which is due for an overhaul since its a couple years since I updated it and I recently found out that if you're running 64-bit, the field size needs to change to Long Integer, along with data types in code):

Analyzer
github.com/strive4peace/Analyzer
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 12:25
Joined
May 21, 2018
Messages
3,685
I tried the rubberduckvba thingy (admittedly a few years ago) and found it very buggy, I'd be intrigued to see if it's improved?
It is open source so it seems to get updated all the time. I have not used to much of it, but no problems. I really like the complete structure. If you type ( it closes it off with ), or " and ". Simple but nice feature.
 

Fran Lombard

Registered User.
Local time
Today, 12:25
Joined
Mar 12, 2014
Messages
123
I once had to create a Call Stack to debug/optimize a form
- I basically created a small logging procedure (DoLog) in a module that would insert a record into a logging table
- one Small procedure (FormLoger) in each Form being logged that had the Form's Name as a constant (this would call DoLog)
- 1 line of code as the first line of each procedure/function which called the FormLoger with the name of the proc
After this basic structure is in place you can always add additional calls to the logger wherever you need them.

I believe with the VBA extensibility library you cab write a process to insert these code bits in in each Form/Proc/Function - Module/Proc/Function that you need

I've played around a little with the VBA extensibility library - It give you the ability to read/write lines of code in any module. You can iterate through the modules much like you do with AllForms

Here's all the code I have from when I was playing around with the VBA extensibility library
I cant claim authorship to most of it - some of it maybe - I found most of it on some site - don't remember where but it does work.

seems code is too long - gotta break it up

Code:
Option Compare Database

Option Explicit





 Public Enum ProcScope

        ScopePrivate = 1

        ScopePublic = 2

        ScopeFriend = 3

        ScopeDefault = 4

    End Enum

    

    Public Enum LineSplits

        LineSplitRemove = 0

        LineSplitKeep = 1

        LineSplitConvert = 2

    End Enum

    

    Public Type ProcInfo

        ProcName As String

        ProcKind As VBIDE.vbext_ProcKind

        ProcStartLine As Long

        ProcBodyLine As Long

        ProcCountLines As Long

        ProcScope As ProcScope

        ProcDeclaration As String

    End Type



Dim VBAEditor As VBIDE.VBE

Dim VBProj As VBIDE.VBProject

Dim VBComp As VBIDE.VBComponent

Dim CodeMod As VBIDE.CodeModule





  Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _

        (ByVal ClassName As String, ByVal WindowName As String) As Long

    

    Private Declare Function LockWindowUpdate Lib "user32" _

        (ByVal hWndLock As Long) As Long
 

Fran Lombard

Registered User.
Local time
Today, 12:25
Joined
Mar 12, 2014
Messages
123
Her is some more

Code:
Public Function Initialize()

    Set VBAEditor = Application.VBE

    Set VBProj = VBAEditor.ActiveVBProject

End Function

Public Function KillObjects()

    Set VBProj = Nothing

    Set VBAEditor = Nothing

End Function



Function IsEditorInSync() As Boolean

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

' IsEditorInSync

' This tests if the VBProject selected in the Project window, and

' therefore the ActiveVBProject is the same as the VBProject associated

' with the ActiveCodePane. If these two VBProjects are the same,

' the editor is in sync and the result is True. If these are not the

' same project, the editor is out of sync and the result is True.

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

    With Application.VBE

    IsEditorInSync = .ActiveVBProject Is _

        .ActiveCodePane.CodeModule.Parent.Collection.Parent

    End With

End Function



Sub SyncVBAEditor()

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

' SyncVBAEditor

' This syncs the editor with respect to the ActiveVBProject and the

' VBProject containing the ActiveCodePane. This makes the project

' that conrains the ActiveCodePane the ActiveVBProject.

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

With Application.VBE

    If Not .ActiveCodePane Is Nothing Then

        Set .ActiveVBProject = .ActiveCodePane.CodeModule.Parent.Collection.Parent

    End If

End With

End Sub



Public Sub AddModuleToProject(TargetAccess As Access.Application, _

                        ByVal ModuleName As String, _

                        ByVal ModuleType As vbext_ComponentType)

On Error GoTo SubError

    'Initialize Objects

    

    Set VBAEditor = TargetAccess.VBE

    Set VBProj = VBAEditor.ActiveVBProject

                

        

        Set VBComp = VBProj.VBComponents.Add(ModuleType)

        VBComp.Name = ModuleName

        

        DoCmd.Save acModule, ModuleName

        DoCmd.Close acModule, ModuleName, acSaveYes



SubExit:

        Set VBComp = Nothing

        Set VBProj = Nothing

        Set VBAEditor = Nothing

    Exit Sub

SubError:

    MsgBox "Error Number: " & Err.Number & " - Descripiton: " & Err.Description

    Resume SubExit

End Sub

    

Sub AddProcedureToModule()

On Error GoTo SubError



Dim LineNum As Long

Const DQUOTE = """" ' one " character

    

    'Initialize Objects

    Set VBAEditor = Application.VBE

    Set VBProj = VBAEditor.ActiveVBProject

    Set VBComp = VBProj.VBComponents("Module1")

    Set CodeMod = VBComp.CodeModule

        

        With CodeMod

            LineNum = .CountOfLines + 1

            .InsertLines LineNum, "Public Sub SayHello()"

            LineNum = LineNum + 1

            .InsertLines LineNum, "    MsgBox " & DQUOTE & "Hello World" & DQUOTE

            LineNum = LineNum + 1

            .InsertLines LineNum, "End Sub"

        End With

        

SubExit:

        Set CodeMod = Nothing

        Set VBComp = Nothing

        Set VBProj = Nothing

        Set VBAEditor = Nothing

    Exit Sub

SubError:

    MsgBox "Error Number: " & Err.Number & " - Descripiton: " & Err.Description

    Resume SubExit

End Sub
 

Fran Lombard

Registered User.
Local time
Today, 12:25
Joined
Mar 12, 2014
Messages
123
and more



Code:
Function CopyModule(ModuleName As String, _

    FromVBProject As VBIDE.VBProject, _

    ToVBProject As VBIDE.VBProject, _

    OverwriteExisting As Boolean) As Boolean

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    ' CopyModule

    ' This function copies a module from one VBProject to

    ' another. It returns True if successful or  False

    ' if an error occurs.

    '

    ' Parameters:

    ' --------------------------------

    ' FromVBProject         The VBProject that contains the module

    '                       to be copied.

    '

    ' ToVBProject           The VBProject into which the module is

    '                       to be copied.

    '

    ' ModuleName            The name of the module to copy.

    '

    ' OverwriteExisting     If True, the VBComponent named ModuleName

    '                       in ToVBProject will be removed before

    '                       importing the module. If False and

    '                       a VBComponent named ModuleName exists

    '                       in ToVBProject, the code will return

    '                       False.

    '

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    

    Dim VBComp As VBIDE.VBComponent

    Dim FName As String

    Dim CompName As String

    Dim s As String

    Dim SlashPos As Long

    Dim ExtPos As Long

    Dim TempVBComp As VBIDE.VBComponent

    

    '''''''''''''''''''''''''''''''''''''''''''''

    ' Do some housekeeping validation.

    '''''''''''''''''''''''''''''''''''''''''''''

    If FromVBProject Is Nothing Then

        CopyModule = False

        Exit Function

    End If

    

    If Trim(ModuleName) = vbNullString Then

        CopyModule = False

        Exit Function

    End If

    

    If ToVBProject Is Nothing Then

        CopyModule = False

        Exit Function

    End If

    

    If FromVBProject.Protection = vbext_pp_locked Then

        CopyModule = False

        Exit Function

    End If

    

    If ToVBProject.Protection = vbext_pp_locked Then

        CopyModule = False

        Exit Function

    End If

    

    On Error Resume Next

    Set VBComp = FromVBProject.VBComponents(ModuleName)

    If Err.Number <> 0 Then

        CopyModule = False

        Exit Function

    End If

    

    ''''''''''''''''''''''''''''''''''''''''''''''''''''

    ' FName is the name of the temporary file to be

    ' used in the Export/Import code.

    ''''''''''''''''''''''''''''''''''''''''''''''''''''

    FName = Environ("Temp") & "\" & ModuleName & ".bas"

    If OverwriteExisting = True Then

        ''''''''''''''''''''''''''''''''''''''

        ' If OverwriteExisting is True, Kill

        ' the existing temp file and remove

        ' the existing VBComponent from the

        ' ToVBProject.

        ''''''''''''''''''''''''''''''''''''''

        If Dir(FName, vbNormal + vbHidden + vbSystem) <> vbNullString Then

            Err.Clear

            Kill FName

            If Err.Number <> 0 Then

                CopyModule = False

                Exit Function

            End If

        End If

        With ToVBProject.VBComponents

            .Remove .Item(ModuleName)

        End With

    Else

        '''''''''''''''''''''''''''''''''''''''''

        ' OverwriteExisting is False. If there is

        ' already a VBComponent named ModuleName,

        ' exit with a return code of False.

        ''''''''''''''''''''''''''''''''''''''''''

        Err.Clear

        Set VBComp = ToVBProject.VBComponents(ModuleName)

        If Err.Number <> 0 Then

            If Err.Number = 9 Then

                ' module doesn't exist. ignore error.

            Else

                ' other error. get out with return value of False

                CopyModule = False

                Exit Function

            End If

        End If

    End If

    

    ''''''''''''''''''''''''''''''''''''''''''''''''''''

    ' Do the Export and Import operation using FName

    ' and then Kill FName.

    ''''''''''''''''''''''''''''''''''''''''''''''''''''

    FromVBProject.VBComponents(ModuleName).Export FileName:=FName

    

    '''''''''''''''''''''''''''''''''''''

    ' Extract the module name from the

    ' export file name.

    '''''''''''''''''''''''''''''''''''''

    SlashPos = InStrRev(FName, "\")

    ExtPos = InStrRev(FName, ".")

    CompName = Mid(FName, SlashPos + 1, ExtPos - SlashPos - 1)

    

    ''''''''''''''''''''''''''''''''''''''''''''''

    ' Document modules (SheetX and ThisWorkbook)

    ' cannot be removed. So, if we are working with

    ' a document object, delete all code in that

    ' component and add the lines of FName

    ' back in to the module.

    ''''''''''''''''''''''''''''''''''''''''''''''

    Set VBComp = Nothing

    Set VBComp = ToVBProject.VBComponents(CompName)

    

    If VBComp Is Nothing Then

        ToVBProject.VBComponents.Import FileName:=FName

    Else

        If VBComp.Type = vbext_ct_Document Then

            ' VBComp is destination module

            Set TempVBComp = ToVBProject.VBComponents.Import(FName)

            ' TempVBComp is source module

            With VBComp.CodeModule

                .DeleteLines 1, .CountOfLines

                s = TempVBComp.CodeModule.Lines(1, TempVBComp.CodeModule.CountOfLines)

                .InsertLines 1, s

            End With

            On Error GoTo 0

            ToVBProject.VBComponents.Remove TempVBComp

        End If

    End If

    Kill FName

    CopyModule = True

End Function



Code:
Sub CreateEventProcedure()

 On Error GoTo SubError

    

Dim LineNum As Long

Const DQUOTE = """" ' one " character

    

    'Initialize Objects

    Set VBAEditor = Application.VBE

    Set VBProj = VBAEditor.ActiveVBProject

    Set VBComp = VBProj.VBComponents("Module1")

    Set CodeMod = VBComp.CodeModule

        

    With CodeMod

        LineNum = .CreateEventProc("Open", "frmMenu")

        LineNum = LineNum + 1

        .InsertLines LineNum, "    MsgBox " & DQUOTE & "Hello World" & DQUOTE

    End With

    

SubExit:

        Set CodeMod = Nothing

        Set VBComp = Nothing

        Set VBProj = Nothing

        Set VBAEditor = Nothing

    Exit Sub

    

SubError:

    MsgBox "Error Number: " & Err.Number & " - Descripiton: " & Err.Description

    Resume SubExit

    

End Sub
 

Fran Lombard

Registered User.
Local time
Today, 12:25
Joined
Mar 12, 2014
Messages
123
And More...


Code:
Sub CreateProcedure()

 On Error GoTo SubError

    

    Dim s As String

    Dim LineNum As Long

    

    ' Use the next two lines to create a new module for the code

    'Set VBComp = ThisWorkbook.VBProject.VBComponents.Add(vbext_ct_StdModule)

    'VBComp.Name = "NewModule"

    ' OR use the following line to use an existing module for the code

    'Set VBComp = ThisWorkbook.VBProject.VBComponents("Module2")

    

    'Initialize Objects

    Set VBAEditor = Application.VBE

    Set VBProj = VBAEditor.ActiveVBProject

    Set VBComp = VBProj.VBComponents("Module1")

    Set CodeMod = VBComp.CodeModule

    

    

    LineNum = CodeMod.CountOfLines + 1

    s = "Sub HelloWorld()" & vbCrLf & _

        "    MsgBox ""Hello, World""" & vbCrLf & _

        "End Sub"

    CodeMod.InsertLines LineNum, s



SubExit:

'        Set CodeMod = Nothing

'        Set VBComp = Nothing

'        Set VBProj = Nothing

'        Set VBAEditor = Nothing

    Exit Sub

SubError:

    MsgBox "Error Number: " & Err.Number & " - Descripiton: " & Err.Description

    Resume SubExit



End Sub



Code:
Sub DeleteModule()

        Dim VBProj As VBIDE.VBProject

        Dim VBComp As VBIDE.VBComponent

    

        Set VBProj = VBAEditor.ActiveVBProject

        Set VBComp = VBProj.VBComponents("Module1")

        VBProj.VBComponents.Remove VBComp

    End Sub



Sub DeleteProcedureFromModule()

        Dim VBProj As VBIDE.VBProject

        Dim VBComp As VBIDE.VBComponent

        Dim CodeMod As VBIDE.CodeModule

        Dim StartLine As Long

        Dim NumLines As Long

        Dim ProcName As String

        

        Set VBProj = VBAEditor.ActiveVBProject

        Set VBComp = VBProj.VBComponents("Module1")

        Set CodeMod = VBComp.CodeModule

    

        ProcName = "DeleteThisProc"

        With CodeMod

            StartLine = .ProcStartLine(ProcName, vbext_pk_Proc)

            NumLines = .ProcCountLines(ProcName, vbext_pk_Proc)

            .DeleteLines StartLine:=StartLine, Count:=NumLines

        End With

    End Sub

Public Function GetModuleText(ByVal AppID As Long, _

                              ByVal strModuleName As String) As String

On Error GoTo FunctionError





Dim oApp As AppInfo.AppApplication

Dim oAccess As Access.Application

Dim sCurrentFullAppName As String



Dim oModule As Access.Module

Dim bLoadResult As Boolean

Dim AppFullPath As String





Dim lCountOfDeclarationLines  As Long

Dim lCountOfLines As Long

Dim strLines As String

Dim i As Integer

Dim strModText As String

        

        

        Set oApp = New AppApplication

        bLoadResult = oApp.LoadByID(AppID)

        AppFullPath = oApp.AppPath & oApp.AppName

        

        

        'Establish Current Full App Name for MS Access Application this code is running in

        sCurrentFullAppName = Application.CurrentProject.Path & "\" & Application.CurrentProject.Name



        If AppFullPath <> sCurrentFullAppName Then

            Set oAccess = New Access.Application

             oAccess.OpenAccessProject AppFullPath, True

        Else

           Set oAccess = Application

        End If

        

        oAccess.DoCmd.OpenModule strModuleName

        

        Set oModule = oAccess.Modules(strModuleName)

        lCountOfDeclarationLines = oModule.CountOfDeclarationLines

        lCountOfLines = oModule.CountOfLines

        

        For i = 1 To lCountOfLines

            strLines = ""

            strLines = oModule.Lines(i, 1)

            strModText = strModText & strLines

             If i <> lCountOfLines Then

                strModText = strModText & vbCrLf

             End If

        Next i

    

        GetModuleText = strModText

        

        oAccess.DoCmd.Close acModule, strModuleName, acSaveNo



        

FunctionExit:

    

    Set oApp = Nothing

    Set oModule = Nothing

    If AppFullPath <> sCurrentFullAppName Then

        oAccess.CloseCurrentDatabase

    End If

    Set oAccess = Nothing

    

    Exit Function



FunctionError:

    Resume FunctionExit

    

End Function



Code:
 Sub EliminateScreenFlicker()

        Dim VBEHwnd As Long

        

        On Error GoTo ErrH:

        

        Application.VBE.MainWindow.Visible = False

        

        VBEHwnd = FindWindow("wndclass_desked_gsk", _

            Application.VBE.MainWindow.Caption)

        

        If VBEHwnd Then

            LockWindowUpdate VBEHwnd

        End If

        

        '''''''''''''''''''''''''

        ' your code here

        '''''''''''''''''''''''''

        

        Application.VBE.MainWindow.Visible = False

ErrH:

        LockWindowUpdate 0&

    End Sub



 Public Function ExportVBComponent(VBComp As VBIDE.VBComponent, _

                FolderName As String, _

                Optional FileName As String, _

                Optional OverwriteExisting As Boolean = True) As Boolean

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    ' This function exports the code module of a VBComponent to a text

    ' file. If FileName is missing, the code will be exported to

    ' a file with the same name as the VBComponent followed by the

    ' appropriate extension.

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    Dim Extension As String

    Dim FName As String

    Extension = GetFileExtension(VBComp:=VBComp)

    If Trim(FileName) = vbNullString Then

        FName = VBComp.Name & Extension

    Else

        FName = FileName

        If InStr(1, FName, ".", vbBinaryCompare) = 0 Then

            FName = FName & Extension

        End If

    End If

    

    If StrComp(Right(FolderName, 1), "\", vbBinaryCompare) = 0 Then

        FName = FolderName & FName

    Else

        FName = FolderName & "\" & FName

    End If

    

    If Dir(FName, vbNormal + vbHidden + vbSystem) <> vbNullString Then

        If OverwriteExisting = True Then

            Kill FName

        Else

            ExportVBComponent = False

            Exit Function

        End If

    End If

    

    VBComp.Export FileName:=FName

    ExportVBComponent = True

    

    End Function



Code:
    Public Function GetFileExtension(VBComp As VBIDE.VBComponent) As String

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    ' This returns the appropriate file extension based on the Type of

    ' the VBComponent.

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

        Select Case VBComp.Type

            Case vbext_ct_ClassModule

                GetFileExtension = ".cls"

            Case vbext_ct_Document

                GetFileExtension = ".cls"

            Case vbext_ct_MSForm

                GetFileExtension = ".frm"

            Case vbext_ct_StdModule

                GetFileExtension = ".bas"

            Case Else

                GetFileExtension = ".bas"

        End Select

        

    End Function

    

    Sub ListModules()

        Dim VBProj As VBIDE.VBProject

        Dim VBComp As VBIDE.VBComponent



        

        Set VBProj = VBAEditor.ActiveVBProject



        

        For Each VBComp In VBProj.VBComponents

             Debug.Print VBComp.Name

            Debug.Print ComponentTypeToString(VBComp.Type)

            

        Next VBComp

    End Sub



Code:
    Function ComponentTypeToString(ComponentType As VBIDE.vbext_ComponentType) As String

        Select Case ComponentType

            Case vbext_ct_ActiveXDesigner

                ComponentTypeToString = "ActiveX Designer"

            Case vbext_ct_ClassModule

                ComponentTypeToString = "Class Module"

            Case vbext_ct_Document

                ComponentTypeToString = "Document Module"

            Case vbext_ct_MSForm

                ComponentTypeToString = "UserForm"

            Case vbext_ct_StdModule

                ComponentTypeToString = "Code Module"

            Case Else

                ComponentTypeToString = "Unknown Type: " & CStr(ComponentType)

        End Select

    End Function

    

     Sub ListProcedures()

        Dim VBProj As VBIDE.VBProject

        Dim VBComp As VBIDE.VBComponent

        Dim CodeMod As VBIDE.CodeModule

        Dim LineNum As Long

        Dim NumLines As Long

        

        

        Dim ProcName As String

        Dim ProcKind As VBIDE.vbext_ProcKind

        

        Set VBProj = VBAEditor.ActiveVBProject

        Set VBComp = VBProj.VBComponents("Module1")

        Set CodeMod = VBComp.CodeModule

        

        

        

        With CodeMod

            LineNum = .CountOfDeclarationLines + 1

            Do Until LineNum >= .CountOfLines

                ProcName = .ProcOfLine(LineNum, ProcKind)

        

                Debug.Print ProcKindString(ProcKind)

                LineNum = .ProcStartLine(ProcName, ProcKind) + _

                        .ProcCountLines(ProcName, ProcKind) + 1

                

            Loop

        End With



    End Sub



Code:
    Function ProcKindString(ProcKind As VBIDE.vbext_ProcKind) As String

        Select Case ProcKind

            Case vbext_pk_Get

                ProcKindString = "Property Get"

            Case vbext_pk_Let

                ProcKindString = "Property Let"

            Case vbext_pk_Set

                ProcKindString = "Property Set"

            Case vbext_pk_Proc

                ProcKindString = "Sub Or Function"

            Case Else

                ProcKindString = "Unknown Type: " & CStr(ProcKind)

        End Select

    End Function
 

Fran Lombard

Registered User.
Local time
Today, 12:25
Joined
Mar 12, 2014
Messages
123
OK This is getting tedious - I downloaded winzip - cnat believe it wasnt on my macine
 

Attachments

  • ModuleEditor.zip
    5.6 KB · Views: 13

Fran Lombard

Registered User.
Local time
Today, 12:25
Joined
Mar 12, 2014
Messages
123
Sounds Right - I know I did download a bunch of stuff from that site. Excellent stuff
 

jdraw

Super Moderator
Staff member
Local time
Today, 12:25
Joined
Jan 23, 2006
Messages
13,409
Thanks for the code Fran. I have found various snippets of code in my searching -some dealing with changing things inside Word, many related to Excel and a couple that are Access oriented. All of them have pieces or derivatives of what you provided -even the comments within are the same.

Just saw Isladog's comment while typing ---I have looked as Chip's site many times, he provided great samples and explanations. I do think a lot of the snippets I've found came from him.

My objective is/was to add a Debug.print "proc name" in each procedure within each module and include a global variable/TempVar whose value would determine to execute or skip the Print. It could be done on a copy of the database, so as to not destroy a working database. After reading some of the articles I found, it seems there are many things to consider that may be beyond
me. It also seems that if this was relatively straightforward, then it would be available or built by now. So maybe it isn't a practical or useful idea.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:25
Joined
Oct 29, 2018
Messages
13,332
OK This is getting tedious - I downloaded winzip - cnat believe it wasnt on my macine
Hi. Just curious why WinZip was needed. Are you not using a Windows machine? Just wondering...
 

Fran Lombard

Registered User.
Local time
Today, 12:25
Joined
Mar 12, 2014
Messages
123
Tried to upload the .bas file and it seems the site didn't want to take it.

The tried copying and pasting the entire module and site complained saying it was too long.

The tried cutting and pasting sections of it and got fustrated. So... I went and got winzip.

There was probably a simple solution like changing the file extension to txt, but in my haste to "help out" didn't think of it.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:25
Joined
Oct 29, 2018
Messages
13,332
Tried to upload the .bas file and it seems the site didn't want to take it.

The tried copying and pasting the entire module and site complained saying it was too long.

The tried cutting and pasting sections of it and got fustrated. So... I went and got winzip.

There was probably a simple solution like changing the file extension to txt, but in my haste to "help out" didn't think of it.
Hi. Thanks. Like I said, I was just curious. Cheers!
 

Users who are viewing this thread

Top Bottom