Thread: range calculate
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default range calculate

Hi

You don't say exactly what you want to calculate, but this is working:

Sub test()
Dim aWB As Workbook
Dim aWS As Worksheet


Set aWB = ThisWorkbook
Set aWS = aWB.Worksheets("Sheet1")


myResult = WorksheetFunction.Sum(aWS.Range("B2:B7"))
aWS.Range("A1") = myResult
End Sub

If this don't help, you need to give us more information about what
you want to do.

Regards,
Per

On 16 Jan., 23:46, pls123 wrote:
hi all !!! does anybody know how can I place a * -range.calculate- *inside a
sub like that starts like the next one ?? .. i tryed but didn't work.. TY

Dim aWB As Workbook
Dim aWS As Worksheet

Set aWB = ThisWorkbook
Set aWS = aWB.Worksheets("Sheet1")