View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Quotes in VBA Code

In a worksheet formula:
=Indirect("A" & 10)

or if B9 will hold the number 10

=Indirect("A" & B9)

------------------

If you mean in code

set rng = Range("A" & 10)

or

lrow = 10
set rng = Range("A" & lRow)



--
Regards,
Tom Ogilvy

"Frank" wrote in message
...
I would like to refer to

=range("A10")

similar to the following

=range(""A" & 10")

so that I can increment the number reference. I know I
have the quotes set up wrong. How do you refer to
changing letters or numbers that need to appear within
quotes? Thanks for your help.