Results 1 to 2 of 2

Thread: vb help!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000


    I am in vb6 (win2000/office2000) and made sure the access library was checked off; can anyone tell me why this simple opening of another office file does not work?

    Private Sub CommandButton1_Click()
    Dim gsHtm As Object
    Set gsHtm = GetObject("C:\csdb.mdb")
    gsHtm.Visible = True
    End Sub

    I have tried a gazillion things to open this mdb file and I really am doing that out of frustration because I am trying to do an htm file! I have tried everything from getobject to create object to activate app when all I want is to open an htm document in the same folder!!! Thank you for any help!


  2. #2
    Dim oAccess As Object 
    Const DBName = "csdb.mdb" 
    Set oAccess = CreateObject("Access.Application") 
    oAccess.OpenCurrentDatabase (gDBName) 
    'stuff here
    Set oAccess = Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width