ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Form Option & Command Buttons (https://www.excelbanter.com/excel-programming/337783-user-form-option-command-buttons.html)

Information Hog[_2_]

User Form Option & Command Buttons
 

I have a user form with Opt. & Cmd. buttons, I am trying to get the
selected Optionbutton.caption to carry over to a sub. The same is true
of the cmdbuttons once one of them have been selected. This probably
seems to simple to answere but I've never done it before so any help
would be greatly appreiciated. Thanks in advance.


--
Information Hog
------------------------------------------------------------------------
Information Hog's Profile: http://www.excelforum.com/member.php...o&userid=21508
View this thread: http://www.excelforum.com/showthread...hreadid=397328


Ronin

User Form Option & Command Buttons
 
Sub MyProcedure(optional byval strCaption as String)
'Procedure goes here
'Sample
Dim mVariable
mVariable = strCaption '<-- strCaption holds the caption string that
you pass on to this current procedure

End Sub

Ronin

"Information Hog" wrote:


I have a user form with Opt. & Cmd. buttons, I am trying to get the
selected Optionbutton.caption to carry over to a sub. The same is true
of the cmdbuttons once one of them have been selected. This probably
seems to simple to answere but I've never done it before so any help
would be greatly appreiciated. Thanks in advance.


--
Information Hog
------------------------------------------------------------------------
Information Hog's Profile: http://www.excelforum.com/member.php...o&userid=21508
View this thread: http://www.excelforum.com/showthread...hreadid=397328




All times are GMT +1. The time now is 06:24 AM.

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