Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i've tried several ways to get this to work, but i can't. i'm
beginning to think you cannot get the .caption off the control......... (when it's a toolbox control): Private Sub OptionButton2_Click() Initial_Sheet_Select ActiveSheet.OLEObjects _("OptionButton2") End Sub Public Sub Initial_Sheet_Select(OLEobj As OLEObject) With OLEobj sTab = .Caption End With wb.Sheets(sTab).Select End Sub any ideas? thanks! susan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub OptionButton2_Click()
Initial_Sheet_Select ActiveSheet.OLEObjects _ ("OptionButton2") End Sub Public Sub Initial_Sheet_Select(OLEobj As OLEObject) With OLEobj sTab = .Object.Caption '<=== End With wb.Sheets(sTab).Select End Sub -- Regards, Tom Ogilvy "Susan" wrote: i've tried several ways to get this to work, but i can't. i'm beginning to think you cannot get the .caption off the control......... (when it's a toolbox control): Private Sub OptionButton2_Click() Initial_Sheet_Select ActiveSheet.OLEObjects _("OptionButton2") End Sub Public Sub Initial_Sheet_Select(OLEobj As OLEObject) With OLEobj sTab = .Caption End With wb.Sheets(sTab).Select End Sub any ideas? thanks! susan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
THANK YOU THANK YOU THANK YOU!!!!
like an hour of agonizing & researching over a stupid period!!! :) susan On May 4, 9:36 am, Tom Ogilvy wrote: Private Sub OptionButton2_Click() Initial_Sheet_Select ActiveSheet.OLEObjects _ ("OptionButton2") End Sub Public Sub Initial_Sheet_Select(OLEobj As OLEObject) With OLEobj sTab = .Object.Caption '<=== End With wb.Sheets(sTab).Select End Sub -- Regards, Tom Ogilvy "Susan" wrote: i've tried several ways to get this to work, but i can't. i'm beginning to think you cannot get the .caption off the control......... (when it's a toolbox control): Private Sub OptionButton2_Click() Initial_Sheet_Select ActiveSheet.OLEObjects _("OptionButton2") End Sub Public Sub Initial_Sheet_Select(OLEobj As OLEObject) With OLEobj sTab = .Caption End With wb.Sheets(sTab).Select End Sub any ideas? thanks! susan- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Caption control on shapes | Excel Discussion (Misc queries) | |||
updating caption of added control | Excel Programming | |||
Can a CommandBar Control Caption be Formatted ? | Excel Programming | |||
Toggle change control button face id & caption | Excel Programming | |||
setting the caption in a button control | Excel Programming |