Why is this an error?

D

davegb

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top