Thread: Range error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
George Andrews George Andrews is offline
external usenet poster
 
Posts: 15
Default Range error

Excel 2000

Can anybody help?

I get a " Method 'Range' of object '_Worksheet' failed " error message when
I run this code:

Private Sub Worksheet_selectionChange(ByVal Target As Range)

If ActiveCell = "Sun" Then

LUPVALUE = Range("f129")

result = Application.WorksheetFunction _
.VLookup(LUPVALUE, Range("testrange"), 2, False)

Application.StatusBar = "Total Orders = " & result
Else
Application.StatusBar = ""

End If
Application.Calculate
End Sub

Can you let me know how to fix this.

Regards

George