Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Access Visual Basic References

Access Visual Basic References

Scheduled Pinned Locked Moved Visual Basic
helpdatabasequestionannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kogorman
    wrote on last edited by
    #1

    We have an Access database that is used here at my company. We have references to Microsoft Word and Excel. The problem is that not everyone here at the company has the same version of Word and Excel. Everyone has been told that they should not be doing developing work in the database, but people still are because the references to the libraries keep getting updated to different versions. We already have people entering in a log in, is there any way that I can detect (using code) when references get changed? Then I could link it back to the user and find out who is developing when they should not be. Thanks for your help! Kogorman

    M 1 Reply Last reply
    0
    • K Kogorman

      We have an Access database that is used here at my company. We have references to Microsoft Word and Excel. The problem is that not everyone here at the company has the same version of Word and Excel. Everyone has been told that they should not be doing developing work in the database, but people still are because the references to the libraries keep getting updated to different versions. We already have people entering in a log in, is there any way that I can detect (using code) when references get changed? Then I could link it back to the user and find out who is developing when they should not be. Thanks for your help! Kogorman

      M Offline
      M Offline
      mikasa
      wrote on last edited by
      #2

      No, your best best is to Code using "Late Binding" methods. All you have to do is get rid of your References when you are sure that the Code works, then Change every Variable to Type "Object". This way it will work no matter what Version of MS Office plus you can trap Errors to determine if Office is not installed. For example:

      On Error Goto ErrHandler
      Dim xlApp As Excel.Application 'Error will Occur here when not installed
      Set xlApp = New Excel.Application

      ErrHandler:
      If (Err.Number <> 0) Then
      'Of course, determine the Correct Error Number for this...
      MsgBox "Excel is not Installed!"
      End If

      Now, change it to this after removing all References to Excel:

      On Error Goto ErrHandler
      Dim xlApp As Object
      Set xlApp = CreateObject("Excel.Application") 'Error will Occur here when not installed

      ErrHandler:
      If (Err.Number <> 0) Then
      'Of course, determine the Correct Error Number for this...
      MsgBox "Excel is not Installed!"
      End If

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups