View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
davegb davegb is offline
external usenet poster
 
Posts: 573
Default Why is this an error?

The following code I copied from a book. But I always get the error
message when I select the data range in the refedit control and click
OK. Why is it never correct?

Private Sub OKButton_Click()
On Error Resume Next
Set rColHdr = Range(reDataStrt.Text)
If Error < 0 Then
MsgBox "Invalid range selection, please select the starting range
again."
On Error GoTo 0
Exit Sub
End If
uf1021Mid.Hide
End Sub

Thanks!