Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How get a row number of the controls(sample:optionbutton)

I create a sheet , add some controls at the cells,
Sample: at cell(10,1), add a optionbutton, when click the button, I will
write some text at cell(10,3)......

I can get the controls' x/y-ray, but the 1-9 row height are not same, so
cant calculate the row number by the way.

Pls help me, thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How get a row number of the controls(sample:optionbutton)

Hi Cyberarmao,

Is this a control from the Forms toolbar?

Try:

'=============
Public Sub Tester()
Dim OpTopLeft As String

OpTopLeft = ActiveSheet.OptionButtons _
("Option Button 2").TopLeftCell.Address(0, 0)

MsgBox OpTopLeft

End Sub
'<<=============

---
Regards,
Norman


"cyberarmao" wrote in message
...
I create a sheet , add some controls at the cells,
Sample: at cell(10,1), add a optionbutton, when click the button, I will
write some text at cell(10,3)......

I can get the controls' x/y-ray, but the 1-9 row height are not same, so
cant calculate the row number by the way.

Pls help me, thank you.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How get a row number of the controls(sample:optionbutton)



"cyberarmao" wrote:

I create a sheet , add some controls at the cells,
Sample: at cell(10,1), add a optionbutton, when click the button, I will
write some text at cell(10,3)......

I can get the controls' x/y-ray, but the 1-9 row height are not same, so
cant calculate the row number by the way.

Pls help me, thank you.

my code is :
Private Sub OptionButton2_Click()
If OptionButton2.Value = True Then
Worksheets("Test").Range("F8").Value = "No Title"
End Sub

I want to calculate the row number of OptionButton2.

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
Can I random sample from a set until every sample is selected? random sampling Excel Discussion (Misc queries) 6 April 26th 10 09:54 PM
How to sort column when cells contain both text & number (Sample X Hreinn Excel Worksheet Functions 6 December 12th 06 06:42 PM
how can I sample a number from a distribution? roy Excel Discussion (Misc queries) 2 September 7th 05 11:58 PM
How does one change the sample number. Instead of zero my workshe. John Excel Discussion (Misc queries) 2 April 15th 05 12:06 AM
How can I find a handle number of controls on Userform? sjoo Excel Programming 1 August 4th 03 10:21 AM


All times are GMT +1. The time now is 07:16 AM.

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

About Us

"It's about Microsoft Excel"