Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello GRAHAM, on my Excel your code works.
Please re-check if the object name is correct or not. You can see a sample file at http://www.interq.or.jp/sun/puremis/...oft/Sample.XLS Private Sub cmdButton1_Click() Dim i As Long For i = 1 To 4 If Me.OLEObjects("optButton" & i).Object.Value Then Application.Goto Sheets("Sheet" & i).Range("A1"), True Exit For End If Next End Sub -- Kind Regards Colo /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Colo of 'The Road of The Cell Masters' :) URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ "GrahamD" wrote in message ... Colo, Thanks for your time and trouble, but I must be dumb as. All I kept getting was "Compile Errors" I did however end up working out my problem, although it took some time. This is what I ended up with... Private Sub cmdButton1_Click() If optButton1.Value = True Then Application.Goto Reference:=Worksheets("Sheet1").Range("A1"), _ Scroll:=True End If If optButton2.Value = True Then Application.Goto Reference:=Worksheets("Sheet2").Range("A1"), _ Scroll:=True End If If optButton3.Value = True Then Application.Goto Reference:=Worksheets("Sheet3").Range("A1"), _ Scroll:=True End If If optButton4.Value = True Then Application.Goto Reference:=Worksheets("Sheet4").Range("A1"), _ Scroll:=True End If End Sub ....................................... Private Sub optButton1_Click() End Sub ....................................... Private Sub optButton2_Click() End Sub ....................................... Private Sub optButton3_Click() End Sub ....................................... Private Sub optButton4_Click() End Sub ...................................... CHEERS GRAHAM ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Radio buttons | Excel Discussion (Misc queries) | |||
Option Buttons/Radio Buttons | New Users to Excel | |||
radio Buttons | Excel Discussion (Misc queries) | |||
Radio Buttons | Excel Worksheet Functions | |||
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True | Excel Worksheet Functions |