• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

select cell content copy to textbox in userform opened modeless

mdavid

Member
Hi, Need some code
I have a userform opened modeless mode with a textbox. I want to click on a cell in column C (not necessarily on the active row ) and have the content of clicked cell copied to textbox in the open userform.
What's the code that's activated when I click cell in column C.

Thanks for any help
David
 

Belleke

Active Member
Like this?
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Column = 3 Then UserForm1.TextBox1.Text = CStr(Target.Value)
End Sub
 

mdavid

Member
Thanks Belleke, works like a charm.
Always spend hours Googling for specific use case, you've given me those hours - to Google something else.

Thanks
David
 
Top