Bom dia pessoal estou com um probleminha.. existe um banco de dados mysql em outra maquina como faco para acessar esse banco sendo que esta em outra maquina usando esser comando? existe algum outro tipo? With ActiveSheet.QueryTables.Add(Connection:= _ "ODBC;DATABASE=reincidentes;DSN=teste;OPTION=0;PWD=masterkey;PORT=0;SERVER=localhost;UID=root" _ , Destination:=Range("A1")) .CommandText = Array(Sql) .Name = "Consulta de teste" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = True .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .PreserveColumnInfo = True .Refresh BackgroundQuery:=False End With End Sub