![]() |
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 |
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 |
All times are GMT +1. The time now is 03:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com