Coba :
Dim filedatabase As StringsDBCon = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
Dim conec As ADODB.Connection
Dim sDBCon as string
"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 SubDim filedatabase As Stringfiledatabase = ThisWorkbook.path & "\MASTER.mdb"On Error GoTo err_handlerSet conec = New ADODB.ConnectionWith conec.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0"
.Open filedatabase
end sub
Terima kasih
Regards
Hendra
--
Kid.
__._,_.___
+-:: 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 |
+-------------------------------------------------------------------+
| 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:
Postar um comentário