Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

How to Set Focus a row - Option Button Click

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lisab - 26 Sep 2007 20:36 GMT
How to Set Focus to the row - Option Button Click

***My Problem***
when you click on an Option Button it does not change the focus or make the
Option Button cell the active cell.

in my worksheet I have a Option Button in every row that will run a macro
that uses the values from the cells in the active row

I would like to set the focus or make the row from where the Button is
pressed, the active row

***example ***
If I click on a cell in row 3 then click on the option button in row 5 the
code that runs uses the values from row 3 - because clicking on the Option
Button does not change the focus off of row 3 and onto row 5

When I click on the option button in row 5, I want to make row 5 the active
row so the macro will use the values in row 5

does anyone have any ideas on how to change the focus when an Option Button
is clicked?
Joel - 26 Sep 2007 21:04 GMT
You need to change the LinkCell property of the Option button.

On excel spreadsheet Menu - View - toolbar - Control Toolbar.  Enter design
mode (triangle).  Then press conhtrol button and select properties on the
toolbar.  Chenge LinkCell to any cell.

Then double click option button to open a VBA macro.  Add code below.  Each
button will have its own macro.

Private Sub OptionButton1_Click()
linkcell = OptionButton1.LinkedCell
Range(linkcell).Select
End Sub

> How to Set Focus to the row - Option Button Click
>
[quoted text clipped - 18 lines]
> does anyone have any ideas on how to change the focus when an Option Button
> is clicked?
Lisab - 26 Sep 2007 21:50 GMT
I used the Option button from the Forms toolbox

When I look at the Command Button from the Control Toolbar I do not see the
LinkCell Property in the property window.  However, there is a
TakeFocusOnClick property.

I am going to change my option butttons to command buttons and see if that
works.

> You need to change the LinkCell property of the Option button.
>
[quoted text clipped - 32 lines]
> > does anyone have any ideas on how to change the focus when an Option Button
> > is clicked?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.