View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Anna Anna is offline
external usenet poster
 
Posts: 132
Default Using a string to reference an address

This works:

strCell = "A" & right(rngCodeFound.address, 2)

Which is much nicer than my lengthly way! But I still need to be able to
treat strCell as an address... sorry if I'm not explaining it right. I need
to be able to do something like this:

rngCodeFound.Copy --- where I am coping cell A1

but because I'm using strCell and it is a string, I can't treat it as an
address... make sense?

"Don Guillett" wrote:

post all of your code pertaining to this. Maybe?

strCell.value ="A"& right( rngCodeFound,2)


--
Don Guillett
SalesAid Software

"anna" wrote in message
...
I want to use my strCell to reference an address, such as "A1" - how would
I
copy this cell? strCell.Copy does not work - I'm assuming it is because I
am
using a string and excel can't read my mind :)

If rngCodeFound Is Nothing Then
MsgBox "No FTO"
'Code is found
Else
strCell = rngCodeFound.Address
strCell = Right(strCell, 2)
strCell = ("A" + strCell)
' copy the cell that strCell variable references
' paste the copied cell to a new wks
End If