Hi,
I know that refedit will return the cell address. Is it possible for it to just return the row of the cell address??
Or is there a way around it??
Thanks
Ben
Hi,
I know that refedit will return the cell address. Is it possible for it to just return the row of the cell address??
Or is there a way around it??
Thanks
Ben
Hi
How about
This should give you the first row of the address.Please Login or Register to view this content.
rylo
Hello Ben,
Yes, you can. Because the data returned by the RefEdit control is Text, it has to be parsed and re-assembled into a Range object. Here is macro to that.
Calling the Macro to set a variable "R" equal to the cell row:Please Login or Register to view this content.
Sincerely,Please Login or Register to view this content.
Leith Ross
Hello All,
Thought I would share what I discovered. I initially tried what Rylo suggested, but I had stored the RefEdit.Value as a String. If the RefEdit.Value is stored as a String and you try to use as a Range address it fails.
Example:
Dim Result As String
Result = RefEdit.Value
R = Range(Result).Row
However, if the RefEdit value is stored in a Variant, the same code works perfectly. Just another case of an undocumented feature in VBA.
Sincerely,
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks