Jim Cone wrote:
Controls in the userform do not need the userform prefix to
identify them as long as the code resides in the form module.
If you are in another module then you must specify where the control is...
Set rColHdr = Range(userf1021Mid.reDataStrt.Value)
Do this before unloading the form.
Pretty much what I did. See above post for results.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"davegb"
wrote in message
I have a userform with a refedit control called reDataStart where the
user inputs where the beginning of the data is. When I try to execute
the macro, I get a compile error that the variable is not defined. But
the control is named.
userf1021Mid.Show vbModeless
Set rColHdr = Range(reDataStrt.Value)
How do I tell VBA that reDataStrt is the control in the userform?
All the examples I could find in the NG didn't mention this being
neccessary. Why is this one different?
Thanks.