Tecnologia, programação e muito Visual FoxPro.

domingo, 19 de setembro de 2010

Re: ]] XL-mania [[ vba untuk buka file mdb atau mde

 

Coba :

    Dim filedatabase As String
        Dim
conec As ADODB.Connection
       
Dim sDBCon as string
        sDBCon = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                 "Data Source=" & filedatabase & ";"
        Set conec= New ADODB.Connection
        conec.Open sDBCon

Regards.
Kid.


2010/9/17 Deandra Keisya <deandra.keisya@yahoo.com>
 

Dear Master2 Excel,
Bagaimana VBA untuk membuka suatu file access mdb atau mde..?
Saya dah cari2 di milis cuma ketemu ini, tp eroor
(Code ini sudah saya ubah, dan sesuai petunjuknya agar file mdb tsb
ditaruh satu folder dgn file excel yg sedang active
)

Private Sub
 
Dim filedatabase As String
filedatabase = ThisWorkbook.path & "\MASTER.mdb"
On Error GoTo err_handler
Set conec = New ADODB.Connection
With conec
    .ConnectionString = _
        "Provider=Microsoft.Jet.OLEDB.4.0"
    .Open filedatabase

end sub


Terima kasih

Regards

Hendra





--
Kid.

__._,_.___
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| oppsss... thr-nya kok cepet banget ya habisnya....  T_____T       |
| http://www.facebook.com/group.php?gid=37671048001&ref=mf          |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message,  melecehkan,  tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan  winzip  jika  perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke  |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/           |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau...  |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html           |
+-------------------------------------------------------------------+
| Message lama ada di :                                             |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]  |
| http://www.mail-archive.com/xl-mania@yahoogroups.com              |
+-------------------------------------------------------------------+
.

__,_._,___

Nenhum comentário:

Arquivo do blog