![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Mar 2004
Location: UK
Posts: 3
|
Hi Guys,
I need to use the function cell("row",Activecell) or row(activecell) in a macro, however neither of these functions seem to be supported by 'worksheetfunction' in visual basic? Is there away to return the row number of a cell in VB? Thanks Regards |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: May 2002
Location: UK
Posts: 3,333
|
Hi i-h,
Just use the Row property, like this: Code:
Sub Test()
Dim lRow As Long
lRow = ActiveCell.Row
MsgBox "Activecell is on row : " & lRow
End Sub
__________________
<font color="blue"> ««« <font color="red">¤ <font color="blue"><font size=+1>Richie </font><font color="red">¤<font color="blue"> »»» </font> |
|
|
|
|
|
#3 |
|
Join Date: Dec 2002
Location: Larache--Morocco
Posts: 2,917
|
Yes :
ActiveCell.Row Regards.
__________________
Jaafar. Happiness is when what you think, what you say, and what you do are in harmony. http://www.laracheenelmundo.com/ |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|