
grabar documento excel
Publicado por raymond (107 intervenciones) el 07/11/2003 23:12:17
Este es el pedazo del codigo que uso para ingresar datos en excel..
todofunciona bien excepto cuando le pongo la propiedad del
.close savechanges = true
si no le pongo el
savechanges = true me funciona bien.. me podrian decir que esta mal??
gracias...
Set objExcel = New Excel.Application
With objExcel
.Workbooks.Open actual & "\util\musica.xls"
If pista Then
MP3Info1.ReadMP3File (ldirectorios.List(cont - 1) & larchivos.List(cont - 1))
.Range("A" & cont1).Select
If MP3Info1.ID3TagFound = True Then
.ActiveCell.FormulaR1C1 = MP3Info1.Songname
.Range("D" & cont1).Select
.ActiveCell.FormulaR1C1 = larchivos.List(cont - 1)
nombre = ""
pista = False
Else
.ActiveCell.FormulaR1C1 = larchivos.List(cont - 1)
nombre = ""
End If
Else
.Range("A" & cont1).Select
.ActiveCell.FormulaR1C1 = larchivos.List(cont - 1)
End If
.Range("B" & cont1).Select
.ActiveCell.FormulaR1C1 = Text1.Text
.Range("C" & cont1).Select
.ActiveCell.FormulaR1C1 = ldirectorios.List(cont - 1)
cont1 = cont1 + 1
Workbooks("musica.xls").Close SaveChanges = True
.Quit
End With
todofunciona bien excepto cuando le pongo la propiedad del
.close savechanges = true
si no le pongo el
savechanges = true me funciona bien.. me podrian decir que esta mal??
gracias...
Set objExcel = New Excel.Application
With objExcel
.Workbooks.Open actual & "\util\musica.xls"
If pista Then
MP3Info1.ReadMP3File (ldirectorios.List(cont - 1) & larchivos.List(cont - 1))
.Range("A" & cont1).Select
If MP3Info1.ID3TagFound = True Then
.ActiveCell.FormulaR1C1 = MP3Info1.Songname
.Range("D" & cont1).Select
.ActiveCell.FormulaR1C1 = larchivos.List(cont - 1)
nombre = ""
pista = False
Else
.ActiveCell.FormulaR1C1 = larchivos.List(cont - 1)
nombre = ""
End If
Else
.Range("A" & cont1).Select
.ActiveCell.FormulaR1C1 = larchivos.List(cont - 1)
End If
.Range("B" & cont1).Select
.ActiveCell.FormulaR1C1 = Text1.Text
.Range("C" & cont1).Select
.ActiveCell.FormulaR1C1 = ldirectorios.List(cont - 1)
cont1 = cont1 + 1
Workbooks("musica.xls").Close SaveChanges = True
.Quit
End With
Valora esta pregunta


0