- Private Sub Command1_Click()
-
- Dim sheet As Object
- Dim exldoc As Object
- Dim exlapp As Object
- Dim i As Integer
- Dim j As Integer
-
- Set exlapp = CreateObject("excel.application")
- Set exldoc = exlapp.workbooks.Open("C:\temp\3.save")
- Set sheet = exlapp.ActiveWorkbook.ActiveSheet
- sheet.Cells(1, 1).Value = 5 '.FormulaR1C1 = "=R[-1]C" 'écrire ds formule
-
- Text1.Text = sheet.Application.ActiveSheet.Cells(2, 1).Value 'lie la celule
- Text2.Text = sheet.Application.ActiveSheet.Cells(2, 1).FormulaR1C1 ' lie formule
- exlapp.workbooks.Close
-
- Set sheet = Nothing
- Set exldoc = Nothing
- Set exlapp = Nothing
-
- End Sub
Private Sub Command1_Click()
Dim sheet As Object
Dim exldoc As Object
Dim exlapp As Object
Dim i As Integer
Dim j As Integer
Set exlapp = CreateObject("excel.application")
Set exldoc = exlapp.workbooks.Open("C:\temp\3.save")
Set sheet = exlapp.ActiveWorkbook.ActiveSheet
sheet.Cells(1, 1).Value = 5 '.FormulaR1C1 = "=R[-1]C" 'écrire ds formule
Text1.Text = sheet.Application.ActiveSheet.Cells(2, 1).Value 'lie la celule
Text2.Text = sheet.Application.ActiveSheet.Cells(2, 1).FormulaR1C1 ' lie formule
exlapp.workbooks.Close
Set sheet = Nothing
Set exldoc = Nothing
Set exlapp = Nothing
End Sub