O
Ole
Hi NG.
I have the following code:
""Sub Makro1()
Dim bClose As Boolean
Dim bk As Workbook
On Error Resume Next
Set bk = Workbooks("Master.xls")
On Error GoTo 0
If bk Is Nothing Then
bClose = True
Set bk = Workbooks.Open("C:\Master.xls")
End If
bk.Worksheets(1).Range("A1).Value = _
Worksheets(1).Range(A1).Value
bk.Save
If bClose Then
bk.Close Savechanges:=False
End If
Application.EnableEvents = False
ThisWorkbook.Save
Application.EnableEvents = True
End Sub""
Now i want to copy the SUM of A38 and A41 to my master.xls, but everything
i
tries failes. someting like this:
bk.Worksheets(1).Range("A1").Value = _
Worksheets(1).Range(=SUM("A38;A41")).Value
I have tried many other things but nothing works, btw. its numbers i have
to
sum.
I hope you have an idea.
Regards,
Ole
I have the following code:
""Sub Makro1()
Dim bClose As Boolean
Dim bk As Workbook
On Error Resume Next
Set bk = Workbooks("Master.xls")
On Error GoTo 0
If bk Is Nothing Then
bClose = True
Set bk = Workbooks.Open("C:\Master.xls")
End If
bk.Worksheets(1).Range("A1).Value = _
Worksheets(1).Range(A1).Value
bk.Save
If bClose Then
bk.Close Savechanges:=False
End If
Application.EnableEvents = False
ThisWorkbook.Save
Application.EnableEvents = True
End Sub""
Now i want to copy the SUM of A38 and A41 to my master.xls, but everything
i
tries failes. someting like this:
bk.Worksheets(1).Range("A1").Value = _
Worksheets(1).Range(=SUM("A38;A41")).Value
I have tried many other things but nothing works, btw. its numbers i have
to
sum.
I hope you have an idea.
Regards,
Ole