Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Row(line) No Syntax?

Can someone show the syntax in VBA for row no? I write a cell value from
sheet1 to a cell in sheet2. I would also like to write in the row no of
sheet1 in another cell of sheet2 so that I know where this value comes
from.

Thanks & Regards.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default VBA Row(line) No Syntax?

On Sat, 1 Nov 2003 00:19:44 -0500, Michael168
wrote:

A range has a Row property that you can use for this:

Sub InsertRowNo()

Dim rng As Range

'One way...

Worksheets(2).Range("A1") = ActiveCell.Value
Worksheets(2).Range("B1") = ActiveCell.Row

'Using a variable range...

Set rng = ActiveCell

Worksheets(2).Range("A2") = ActiveCell.Value
Worksheets(2).Range("B2") = ActiveCell.Row

End Sub


Can someone show the syntax in VBA for row no? I write a cell value from
sheet1 to a cell in sheet2. I would also like to write in the row no of
sheet1 in another cell of sheet2 so that I know where this value comes
from.



---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *
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
right syntax pls123 Excel Worksheet Functions 8 May 6th 10 05:18 AM
How to convert a dotted line to a solid line in a line graph Sharlz Charts and Charting in Excel 1 January 14th 09 04:51 AM
The NOW() syntax Tom Excel Discussion (Misc queries) 3 January 4th 08 04:10 PM
SQL syntax Spike Excel Worksheet Functions 2 March 8th 07 08:27 AM
coloring overy other line without doing so line by line gen Excel Worksheet Functions 5 April 1st 05 10:38 PM


All times are GMT +1. The time now is 06:38 PM.

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"