cargar consulta en excel
Publicado por choche_ (4 intervenciones) el 11/09/2006 03:46:50
Hola necesito ayuda con lo siguiente tengo una consulta que la llevo a excel sin singun problema pero resulta que cuando la ejecuto me solicita la clve y usuario pero con el codigo ya esta configurado con el user y password.-
Str = "excel_despacho_folio_res2 " & txtFolioInicio.Text & " "
Sheets("despachos").Select
Sheets("despachos").Cells.Select
Selection.Delete Shift:=xlUp
Sheets("despachos").Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
"ODBC;DSN=cpvqEmpaque;UID=sa;APP=Microsoft Office 2003;DATABASE=vq_empaque;LANGUAGE=Español;QueryLog_On=Yes;QueryL" _
), Array("ogTime=60000")), Destination:=Sheets("despachos").Range("A1"))
.CommandText = Str
......
.Refresh BackgroundQuery:=False
End With
espero colaboracion.-
Str = "excel_despacho_folio_res2 " & txtFolioInicio.Text & " "
Sheets("despachos").Select
Sheets("despachos").Cells.Select
Selection.Delete Shift:=xlUp
Sheets("despachos").Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
"ODBC;DSN=cpvqEmpaque;UID=sa;APP=Microsoft Office 2003;DATABASE=vq_empaque;LANGUAGE=Español;QueryLog_On=Yes;QueryL" _
), Array("ogTime=60000")), Destination:=Sheets("despachos").Range("A1"))
.CommandText = Str
......
.Refresh BackgroundQuery:=False
End With
espero colaboracion.-
Valora esta pregunta


0