VBA: Extracting Range from worksheet and inserting into userform

  • Thread starter Thread starter Mcasteel
  • Start date Start date
M

Mcasteel

Thank you again for your help Bob, your solutions are really going t
help me out. Like I stated earlier, Im a novice programmer, I have no
programmed in 2-3 years and my boss came to me with this project whic
was a little over my head, but I knew it was possible.

I have just one last question. You showed me how to return data fro
the worksheet to a label. I just want to be sure I also know how to d
this to a text box.

_For_lablel:__
userfrm.lblSSNCaption = Worksheets("Sheet1").Range("A1").Value
_For_Textbox?_
userfrm.txtSSNvalue = worksheet("sheet1).range("a1").value

???'s
Can I pull the data right from thw worksheet stright into the objec
like this, or do I have to go from the worksheet to a variable and the
to the object in the userform?


Thank you again.

Mike
Kalamazoo, Michiga
 
Mike,

I missed a dot in that response. they should be

_For_lablel:__
userfrm.lblSSN.Caption = Worksheets("Sheet1").Range("A1").Value
_For_Textbox?_
userfrm.txtSSN.Text = worksheet("sheet1).range("a1").value

Sorry about that. you got the principle but copied my error<g>

Bob

PS Is Kalamazoo the home of Fender guitars (or is my memory failing me)?
 
Back
Top