reading cells by name/definition
Here is an example demonstrating that it does work
Range("A1").Value = 99
Range("A1").Name = "my_named_range"
MsgBox Range("my_named_range").Value
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
wrote in message
ups.com...
thanks for the reply bob. but for some reason it is not working
exception thrown refers to this method
excel.worksheet.getrange(object cell1, object cell2)
I am passing the cell name as string to the range method
Bob Phillips wrote:
Which you didn't mention in your post.
It works, it must be your code somewhere.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
wrote in message
ups.com...
i tried it and it generated an exception citing problems with
"getrange" method
just wish to know is it possible to access a cell content by its name?
Bob Phillips wrote:
Did you try it? If you did you would answer your own question.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
wrote in message
oups.com...
Hello all,
just wish to know is it possible to read excel cells by their name
instead of cell reference.
i.e. instead of using xlsheet.range(A4).value, can i use
xlsheet.range("my_given_name").value
where A4 is named as my_given_name ?
|