View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Property of a cell with a string

After serious thinking Slim Slender wrote :
If .Cells(myRow, myColumn).???? = "String"
Then

What property of cells do I need here? Value gives an error.
Auto List Members, List properties/Methods won't work for me. They are
turned on in Options but I can't get any help.


..Value is default; .Text may be an option; -neither are needed here!

Try using a var to put the cell contents into, then test the var.

Dim vTemp As Variant

'Get the cell contents
vTemp = Cells(myRow, myColumn)

'Test the cell contents
If vTemp = "String" Then...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc