Hi all,
I'm at my wits end here. I have the following code:
In the worksheet that I'm testing this in, the text "Dates" is contained in cell A26, so the msgbox should come up as $A£26, but no such luck. The cell is formatted as general. i also tried saying c.text instead of .value but still no luck. i even tried c.value2 ... even thought I have NOOOOO idea what that does !!
please, can somebody help?
I'm at my wits end here. I have the following code:
Code:
sub myDateSub()
Dim ws as worksheet
dim c as range
dim rng as range
dim cn as string ' I don't know what I should call this ?
set ws as sheets("MySheet")
set rng as ws.Range("A11:D50")
for each c in rng
if c.value = "Dates" then ' this line is the problem
cn.value = c.address
msgbox(cn)
end if
next c
In the worksheet that I'm testing this in, the text "Dates" is contained in cell A26, so the msgbox should come up as $A£26, but no such luck. The cell is formatted as general. i also tried saying c.text instead of .value but still no luck. i even tried c.value2 ... even thought I have NOOOOO idea what that does !!
please, can somebody help?