Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
k483
 
Posts: n/a
Default Determining the current row and col


What's the VB syntax for determining the current row and current col
prior to a DoubleClick?

Thanks


k483


--
k483
------------------------------------------------------------------------
k483's Profile: http://www.excelforum.com/member.php...o&userid=10791
View this thread: http://www.excelforum.com/showthread...hreadid=488215

  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default Determining the current row and col

If you mean the cell in which the double click occurred, then one way:

Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Excel.Range, Cancel As Boolean)
With Target
MsgBox "Address: " & .Address & vbNewLine & _
"Row: " & .Row & vbNewLine & _
"Column: " & .Column
End With
End Sub

Put the code in the Worksheet code module.

In article ,
k483 wrote:

What's the VB syntax for determining the current row and current col
prior to a DoubleClick?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Determining the current row and col

Sub Macro1()
i = Selection.Row
j = Selection.Column
MsgBox (i)
MsgBox (j)
End Sub

If you have Selected a single cell
--
Gary's Student


"k483" wrote:


What's the VB syntax for determining the current row and current col
prior to a DoubleClick?

Thanks


k483


--
k483
------------------------------------------------------------------------
k483's Profile: http://www.excelforum.com/member.php...o&userid=10791
View this thread: http://www.excelforum.com/showthread...hreadid=488215


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



All times are GMT +1. The time now is 08:57 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"