Option button caption

  • Thread starter Thread starter Buce Roberson
  • Start date Start date
B

Buce Roberson

Since the caption's label is what a user sees when they
pull up a form and look at an option button, I need to
know if there is a way to have that caption name be able
to change itself based on an cell entry.

In other words, if cell A1 contains the text I want on the
caption, I would want the user to be able to type
something else in that cell and then have the form
automatically change the name on the caption so that the
user sees what they typed in the cell A1 without having to
teach the user to go in there and make changes to a form.

Hopefully this description makes sense.
 
Private Sub Userform_Initialize()
Dim rng as Range
set rng = Worksheets("Sheet1").Range("A1")
if not isempty(rng) then
label1.caption = rng.Text
End if
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

Back
Top