Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Change UserForm ControlSource with VBA
Hi,
My desired scenario... Private Sub Sale_Notes_OptionButton_Click() Change Value of Notes_TextBox CONTROLSOURCE Value here... End Sub Private Sub Delivery_Notes_OptionButton_Click() Change Value of Notes_TextBox CONTROLSOURCE Value to Something Else here... End Sub The OptionButtons and Notes_TextBox are on a UserForm. I want to be able to change what text is displayed in Notes_TextBox (from named cells on various worksheets) by clicking on appropriate Option Buttons on the UserForm. Can I do this? Thanks, Jim |
#2
|
|||
|
|||
Hello Jim
Very easily done if you use named ranges: Private Sub Delivery_Notes_OptionButton_Click() Me.Notes_TextBox.value = Range("Sale").Value End Sub Private Sub Delivery_Notes_OptionButton_Click() Me.Notes_TextBox.Value = Range("Delivery").Value End Sub HTH Cordially a écrit dans le message de news: ... Hi, My desired scenario... Private Sub Sale_Notes_OptionButton_Click() Change Value of Notes_TextBox CONTROLSOURCE Value here... End Sub Private Sub Delivery_Notes_OptionButton_Click() Change Value of Notes_TextBox CONTROLSOURCE Value to Something Else here... End Sub The OptionButtons and Notes_TextBox are on a UserForm. I want to be able to change what text is displayed in Notes_TextBox (from named cells on various worksheets) by clicking on appropriate Option Buttons on the UserForm. Can I do this? Thanks, Jim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I get the font color to change automatically depending on | Excel Discussion (Misc queries) | |||
How do I link two cells as to allow me to change the value in eit. | Excel Discussion (Misc queries) | |||
how do i make a date change automatically if i change one before . | Excel Discussion (Misc queries) | |||
How to change the default font and size of "comments"? | Excel Discussion (Misc queries) | |||
Worksheet Row Change event | Excel Discussion (Misc queries) |