View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Kevin B Kevin B is offline
external usenet poster
 
Posts: 1,316
Default Macro to paste row number in cell

Try this:

Sub PostRow()

Dim MyRow As Long

MyRow = ActiveCell.Row
ActiveSheet.Next.Select
Range("H32").Select
ActiveCell.Value = myrow
End Sub

--
Kevin Backmann


"leonidas" wrote:


Hi,

I have the following macro. How do I paste the rownumber in cell H32?

Sub test()

myrow = ActiveCell.Row
ActiveSheet.Next.Select
Range("H32").Select

End Sub


--
leonidas
------------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
View this thread: http://www.excelforum.com/showthread...hreadid=556426