Visual Basic - Exportar flexgrid a exel, ayudaaaaaaaaaaaaaaaaa

Life is soft - evento anual de software empresarial
 
Vista:

Exportar flexgrid a exel, ayudaaaaaaaaaaaaaaaaa

Publicado por OMAR (56 intervenciones) el 03/06/2005 20:15:48
Saludos foro, ya le di mil vueltas y no he podido exportar la informacion de un flexgrid a exel, Si fuera muy complicado, se podria exportar directo de3 la bd (access2000) a exel.

De antemano os agradezco.

Private Sub CMDEXPORTA_Click()
Dim Exporta As New ADODB.Recordset
Dim strExporta As String

Dim Apli As Excel.Application
Dim Fi As Integer
Dim Columna As Integer

strExporta = "SELECT Nombrec,F_nac,Lug_nac,Calle,Exterior,Colonia,Nom_mun FROM Nl WHERE Nombre ='" & TXTNOM.Text & "' AND Paterno ='" & TXTAPPAT.Text & "' ORDER BY Nombrec"

Set Exporta = ConnNL.Execute(strExporta)

Set Apli = New Excel.Application
Apli.Visible = True
Apli.SheetsInNewWorkbook = 1
Apli.Workbooks.Add
With Apli.ActiveSheet
Exporta.MoveFirst
Do While Not Exporta.EOF
Fi = Fi + 1
For Columna = 0 To MSFlexGrid1.Col - 1
.Cells(Fi, Columna + 1).Value = MSFlexGrid1.Col(Columna) **NUMERO DE ARGUMENTOS ERRONEOS O ASIGNACION DE PROPIEDAD NO VALIDAD**

Next Columna
Exporta.MoveNext
Loop
End With
Exporta.Close
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Exportar flexgrid a exel, ayudaaaaaaaaaaaaaaaaa

Publicado por SetFocus (183 intervenciones) el 04/06/2005 20:42:35
Hola! Ya te conteste el mail que me mandaste, con la posibe solucion.Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar