RefEdit control

T

Tim

Hi,

I'm trying to use the RefEdit control on a userform to select a range on a
worksheet to paste the contents of a text box to. on pressing the refedit
button it navigates to a different sheet in the same workbook (which is what
i want), producing a value of

'Lab Request'!$C$8

which is fine, thats where i want to data to go, but i can't work out how to
tell vb to put the contents of textbox2 to that cell reference... i can
normally work this sort of thing out, but not this time - something tells me
its really easy.

tia,
tim
 
S

steve

verry simple version this is the modual behind a user
form with a textbox, refedit box and a comand butten

have fun


Private Sub CommandButton1_Click()
Dim R As Range
Set R = Range(RefEdit1.Value)
R.Value = TextBox1.Value
End Sub
 
T

Tim

works like a dream - cheers!

steve said:
verry simple version this is the modual behind a user
form with a textbox, refedit box and a comand butten

have fun


Private Sub CommandButton1_Click()
Dim R As Range
Set R = Range(RefEdit1.Value)
R.Value = TextBox1.Value
End Sub
 

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