ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reference a cell in a worksheet from a userform (https://www.excelbanter.com/excel-programming/324426-reference-cell-worksheet-userform.html)

Adam

Reference a cell in a worksheet from a userform
 
I have a userform with option buttons on it. I am trying to accomplish the
fact when a user clicks on this particular option button it will fill a
textbox with data from a cell on a worksheet. How do I do this?

K Dales[_2_]

Reference a cell in a worksheet from a userform
 
A simple example (2 options):
Private Sub OptionButton1_Click()
TextBox1 = Sheets("Sheet1").Range("A1").Value
End Sub

Private Sub OptionButton2_Click()
TextBox1 = Sheets("Sheet1").Range("A2").Value
End Sub

You should be able to modify this idea to meet your needs.

"Adam" wrote:

I have a userform with option buttons on it. I am trying to accomplish the
fact when a user clicks on this particular option button it will fill a
textbox with data from a cell on a worksheet. How do I do this?



All times are GMT +1. The time now is 04:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com