Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Michel, you're greatfull!
"michelxld" wrote: Hello Dennis , Hello Paul you may try this macro to know if a table exist Dim cnn As New ADODB.Connection Dim rsT As ADODB.Recordset Dim Verif As Boolean Dim dbName As String Set cnn = New Connection dbName = ("C:\Data\MYDataBase1.mdb") With cnn .Provider = "Microsoft.Jet.OLEDB.4.0" .Mode = adModeWrite .Properties("Jet OLEDB:Database Password") = "abc" .Open dbName End With Set rsT = cnn.OpenSchema(adSchemaTables) Verif = False While Not rsT.EOF If rsT.Fields("TABLE_NAME") = "MYTABLE" Then Verif = True rsT.MoveNext Wend If Verif = False Then MsgBox "The Table does not Exist ." Else MsgBox "the table exist" End If cnn.Close Set cnn = Nothing Set rsT = Nothing Regards , michel -- michelxld ------------------------------------------------------------------------ michelxld's Profile: http://www.excelforum.com/member.php...o&userid=17367 View this thread: http://www.excelforum.com/showthread...hreadid=397397 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel link to access query not working | Excel Discussion (Misc queries) | |||
Excel Quick Access Toolbar Commands not working? | Excel Discussion (Misc queries) | |||
vlookup with zip codes - not working - frustrated | Excel Worksheet Functions | |||
Lookups in Excel on Data from Access not working | Excel Worksheet Functions | |||
Working with protected Databases Access through Excel | Excel Programming |