Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel Visual Basic to get current row number

I have an excel spreadsheet with 40 columns and 200 rows. Part of my code is below. How do I write the line sEndRow = sRange.Row to correctly get number 10, if my curosr is in cell H10?

Thanks in advance,
Matt




Sub Welcome_Note()

Dim sRange As Range
Dim sEndRow As Integer
Dim sFirst_Name As String
Dim sLast_Name As String

sEndRow = sRange.Row
sFirst_Name = ActiveSheet.Range("AA" & sEndRow)
sLast_Name = ActiveSheet.Range("AA" & sEndRow)
sFull_Name = sFirst_Name & " " & sLast_Name

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Excel Visual Basic to get current row number

Already answered in the other forum you posted to.

In future, please do not multi-post; cross-post instead so answers in
any forum also display in all forums posted to.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
Excel and its Visual Basic IDE TJMonti Excel Programming 4 April 20th 09 08:04 PM
Programmatic access to visual basic project via Visual FoxPro Jim Rech Excel Programming 0 January 11th 07 01:53 PM
Excel and Visual Basic arand Excel Programming 2 June 26th 06 04:14 AM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


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