Giter Site home page Giter Site logo

Comments (9)

jwbrookes avatar jwbrookes commented on July 18, 2024

What libraries are you referencing?
That looks like the reference for VBA; if it is then it won't affect the project. The VBA library is present by default.

from msaccess-vcs-integration.

jwbrookes avatar jwbrookes commented on July 18, 2024

I've added the error number to the message box title. if you could download the master, run the import again and tell me what the error number is then I'll look into this.

from msaccess-vcs-integration.

glennwiz avatar glennwiz commented on July 18, 2024

The error number is -2147319779, i have only the default refrences that is already specified in the demo.accdb

from msaccess-vcs-integration.

jwbrookes avatar jwbrookes commented on July 18, 2024

Well, the error number is meaningless.
For each of the following lines, copy it into the immediate window in the VBA editor and hit return:
Debug.Print application.References("VBA").Guid
Debug.Print application.References("VBA").FullPath
Debug.Print application.References("VBA").Major
Debug.Print application.References("VBA").Minor
and then post the output here.

from msaccess-vcs-integration.

glennwiz avatar glennwiz commented on July 18, 2024

Your suspicion that is was VBA is correct.

Debug.Print application.References("VBA").Guid
{000204EF-0000-0000-C000-000000000046}
Debug.Print application.References("VBA").FullPath
C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA7.1\VBE7.DLL
Debug.Print application.References("VBA").Major
4 
Debug.Print application.References("VBA").Minor
2 

from msaccess-vcs-integration.

Ronaldvr avatar Ronaldvr commented on July 18, 2024

I found an easy solution by using the "BuiltIn" property:

    For Each ref In Application.References
        If ref.GUID > "" Then ' references of types mdb,accdb,mde etc don't have a GUID
        ElseIf Not ref.BuiltIn Then
          line = ref.FullPath
          outfile.WriteLine line
        End If
    Next

Using this in the EXPORTReferences eliminates the bug

from msaccess-vcs-integration.

Ronaldvr avatar Ronaldvr commented on July 18, 2024

Its seems that I did not test this correctly or that this gives odd results, but when I tested it this mornig this suddely failed to do the trick. So chalk this up as a dead end.

from msaccess-vcs-integration.

Ronaldvr avatar Ronaldvr commented on July 18, 2024

The correct code is as follows:

Public Function ExportReferences(obj_path As String)
Dim FSO, outfile
Dim line As String
Dim ref As Reference

Set FSO = CreateObject("Scripting.FileSystemObject")
Set outfile = FSO.CreateTextFile(obj_path & "references.csv", True)
For Each ref In Application.References
    If ref.GUID > "" Then ' references of types mdb,accdb,mde etc don't have a GUID
        If Not ref.BuiltIn Then
            line = ref.GUID & "," & CStr(ref.Major) & "," & CStr(ref.Minor)
            outfile.WriteLine line
        End If
    Else
        line = ref.FullPath
        outfile.WriteLine line
    End If
Next
outfile.Close
End Function

from msaccess-vcs-integration.

timabell avatar timabell commented on July 18, 2024

fixed in bde584e
already pushed to master.
thanks for the code @Ronaldvr

from msaccess-vcs-integration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.