Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2006

Tip: Looking for answers? Try searching our database.

First row in Selection range (first index of a cell) EXCEL VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mar_male@wp.pl - 20 Mar 2006 14:43 GMT
Hello,
I have a problem with selecting first cel in selection Range or return
an index of the first cell in Selection Cell.

I have something like this (VBA Code):
...................
Range1.Select
"and here I want to Select the first range in selection Range1"
............
I there any special function of finding first cell in selection range
or returning an index of the first cell??
Thanks for answet
Marcin
Kevin Vaughn - 20 Mar 2006 22:38 GMT
You want the first cell in the range?  You can use .range("a1") of the range.
Here is a short example:

Sub TestRange()
   Dim rng As Range
   Set rng = Range("a1", "d10")
   Debug.Print rng.Address
   Debug.Print rng.Range("a1").Address
End Sub

In the Immediate window shows:
$A$1:$D$10
$A$1
Is that what you wanted?
Signature

Kevin Vaughn

> Hello,
> I have a problem with selecting first cel in selection Range or return
[quoted text clipped - 9 lines]
> Thanks for answet
> Marcin
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.