variable userform caption

  • Thread starter Thread starter greg prost
  • Start date Start date
G

greg prost

is there any way to have the caption of an optionbutton
on a userform depend on a pre-specified string.

ie. The following is in the workbook code...

Dim Insp1 As String
Insp1 = Sheets(1).Range("A1").Value

A1 can change, and I want the option buttons' caption to
change accordingly.

If any one can help it would be a great help

TIA
 
Greg,

Try something like

Private Sub UserForm_Initialize()
Me.OptionButton1.Caption = ActiveSheet.Range("A1").Text
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top