View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
esbee esbee is offline
external usenet poster
 
Posts: 15
Default Match function in VBA

Thanks once again. I realised my mistake after posting my reply. Now I am
struggling with the quotes while trying to replace the name "Cricket" by a
variable name "game_name" to generalise the code. It is playing truant with
me. Still I shall try for some more time and if I fail I shall once again
approach you. Thanks for sparing so much of your time for me.
--
esbee


"Equiangular" wrote:

You should not enclose a variable name in double quotes
& is for concatenating two strings

e.g.

Name="tom"
MsgBox "Hello! " & Name

The output is
Hello! Tom

When you need to display a quote, you need to use two quotes

e.g.

s="test "" quote"
MsgBox s

The output is
test " quote

esbee wrote:
Many thanks. It's working fine. I didn't know that even '&my_last_row&'
should be enclosed in double quotes. Thanks for this knowledge.