Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How to Set Focus a row - Option Button Click

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default How to Set Focus a row - Option Button Click

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


"Lisab" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How to Set Focus a row - Option Button Click

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.

"Joel" wrote:

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


"Lisab" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Click Option Button 2x in a Row opieandy Excel Discussion (Misc queries) 2 July 5th 09 10:19 PM
need help on how to grey out one option button in one group box based on the selection of another option button in another group box George Excel Programming 12 March 11th 07 02:08 PM
Option Button/Focus Problem on Worksheet Resume Next Excel Programming 4 September 20th 05 01:10 AM
commnd button - when i rt click, "assign macro" isnt an option... kevin[_3_] Excel Programming 1 November 12th 04 09:52 PM
Code to tab from option button click Glen Millar Excel Programming 3 May 19th 04 02:14 AM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"