Cara mengetahui versi Microsoft Access dari Windows Registry di Visual Basic 6

Bagaimana cara mengetahui versi dari Microsoft Access yang telah terinstall di komputer anda? Selain secara manual (Anda ke Program Files untuk melihat nama Microsoft Access yang anda gunakan), anda juga bisa melihat dengan membaca Registry pada Windows dengan sedikit kode di Visual Basic 6.

Fungsi AmbilVersiAccess untuk mendapatkan versi dari Microsoft Access dari Registry:

Public Function AmbilVersiAccess() As String
    AmbilVersiAccess = GetRegKeyValue(HKEY_CLASSES_ROOT,"Access.Application\CurVer", "")
End Function

Fungsi AngkaVersiAccess untuk mengambil angka versi dari fungsi AmbilVersiAccess:

Public Function AmbilAngkaVersiAccess() As Integer
Dim VersiAccess As String
Dim posisi As Integer
    VersiAccess = AmbilVersiAccess()
    posisi = InStrRev(VersiAccess, ".")
    AmbilAngkaVersiAccess = CInt(Mid$(VersiAccess, posisi + 1))
End Function

Fungsi NamaVersiAccess mengubah angka versi menjadi nama dari versi Microsoft Access tersebut:

Public Function NamaVersiAccess() As String
    Select Case AmbilAngkaVersiAccess
        Case 8
            NamaVersiAccess = "Access 97"
        Case 9
            NamaVersiAccess = "Access 2000"
        Case 10
            NamaVersiAccess = "Access 2002" ' Office XP
        Case 11
            NamaVersiAccess = "Access 2003"
        Case 12
            NamaVersiAccess = "Access 2007"
	Case 13
	    NamaVersiAccess = "Access 2010"
        Case Else
            NamaVersiAccess = "Tidak diketahui"
    End Select
End Function
clixsense468x60a Cara mengetahui versi Microsoft Access dari Windows Registry di Visual Basic 6

2 thoughts on “Cara mengetahui versi Microsoft Access dari Windows Registry di Visual Basic 6

    1. chandra Post author

      Iya, kan sudah dijelaskan kalau *misal* mau tahu caranya berapa versi Access di komputer dengan membaca registry windows. Jadi mungkin bagi sebagian besar orang lebih mudah membuka Microsoft Accessnya langsung.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>