Why is this an error?

  • Thread starter Thread starter davegb
  • Start date Start date
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!
 
davegb,

Change "Error" to "Err" and I belive it will work.

hth,

Doug
 

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

Similar Threads

running program from userform 10
Type Mismatch? 3
refedit won't work 8
range not carrying over 11
Ambiguous Name detected? 2
Copy filtered data to sheet 2 1
Cancel Input Box error 16
How to hide password? 1

Back
Top