Ver Mensaje Individual
  #5 (permalink)  
Antiguo 31/07/2008, 15:47
javiergarciaperez
 
Fecha de Ingreso: julio-2008
Mensajes: 36
Antigüedad: 16 años, 9 meses
Puntos: 0
Respuesta: Excel y Visual Basic 6.0

¿El código quedaría así? Es esto a lo que te refieres?
Gracias.

Private objExcel As Object
Private Sub Timer1_Timer()
Label1.Caption = objExcel.Worksheets("Hoja1").Range("A1")
End Sub
Private Sub Command1_Click()
Dim objExcel As Excel.Application
Dim xLibro As Excel.Workbook
Dim Col As Integer, Fila As Integer
Set objExcel = New Excel.Application
Set xLibro = objExcel.Workbooks.Open("C:\hoja.xls")
objExcel.Visible = True
With xLibro
With .Sheets(1)
Fila = 1
Label1.Caption = cells(Fila, 2)
Fila = 2
cells(Fila, 2) = Text1.Text
End With
End With
Set objExcel = Nothing
Set xLibro = Nothing
End Sub