PC Review


Reply
Thread Tools Rate Thread

How do I get the row number?

 
 
Jock
Guest
Posts: n/a
 
      13th Nov 2009
Hi,
The code snippet below will copy data from a certain row plus other info to
a different sheet.
I would like it to include the row number (at the end) of the row copied
from for ease of identification in the future. Any ideas welcomed.

.Range("B" & lngNewRow).Value = Sheets("claims").Range("D" & lngRowNo)
.Range("C" & lngNewRow).Value = Sheets("claims").Range("E" & lngRowNo)
.Range("H" & lngNewRow).Value = UserForm8.TextBox1.Text
.Range("I" & lngNewRow).Value = UserName()
.Range("J" & lngNewRow).Value = Format(Date, "dd mmm")
.Range("K" & lngNewRow).Value = Format(Time, "hh:mm")
.Range("L" & lngNewRow).Value = rownumber()

Thanks
--
Traa Dy Liooar

Jock
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      13th Nov 2009
Jock,

Isn't it lngRowNo you want

..Range("L" & lngNewRow).Value = lngRowNo


Mike

"Jock" wrote:

> Hi,
> The code snippet below will copy data from a certain row plus other info to
> a different sheet.
> I would like it to include the row number (at the end) of the row copied
> from for ease of identification in the future. Any ideas welcomed.
>
> .Range("B" & lngNewRow).Value = Sheets("claims").Range("D" & lngRowNo)
> .Range("C" & lngNewRow).Value = Sheets("claims").Range("E" & lngRowNo)
> .Range("H" & lngNewRow).Value = UserForm8.TextBox1.Text
> .Range("I" & lngNewRow).Value = UserName()
> .Range("J" & lngNewRow).Value = Format(Date, "dd mmm")
> .Range("K" & lngNewRow).Value = Format(Time, "hh:mm")
> .Range("L" & lngNewRow).Value = rownumber()
>
> Thanks
> --
> Traa Dy Liooar
>
> Jock

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to add page number using word 2007 template number missing =?Utf-8?B?ZGVlbXVr?= Microsoft Word Document Management 7 12th Apr 2012 03:20 PM
Sumif number is greater than a number but less than another number lulu151 Microsoft Excel Misc 2 7th May 2010 07:12 PM
Inserting a number of rows based on the number of columns filled bytext values zorakramone Microsoft Excel Programming 4 3rd Aug 2009 08:21 AM
How to calculate number of occurencies of a specific number number Stefan Microsoft Excel Misc 4 8th Sep 2008 08:33 AM
Re: number of spaces after number, period, number Suzanne S. Barnhill Microsoft Word Document Management 0 15th Dec 2006 04:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:22 AM.