PDA

View Full Version : mismatch error



Rambo
03-25-2008, 04:50 AM
Hi, Im getting a mismatch error, i can figure out why


Dummy is a string

CurrentDesc is a string


Dummy = Worksheets("Sheet1").Cells(2 + CurrentDesc, 4).Value


im trying to get a string from a cell on a worksheet and put it into the variable dummy.

Thanks

Bob Phillips
03-25-2008, 04:56 AM
I have no idea wht is in CurrentDesc, but if it MUST be a string, try



Dummy = Worksheets("Sheet1").Cells(2 + Val(CurrentDesc), 4).Value

Rambo
03-25-2008, 05:06 AM
I have no idea wht is in CurrentDesc, but if it MUST be a string, try



Dummy = Worksheets("Sheet1").Cells(2 + Val(CurrentDesc), 4).Value



Hi,

this is what its in CurrentDesc:

CurrentDesc = Worksheets("Sheet1").Cells(2 + C, 4).Value

hope that helps

Bob Phillips
03-25-2008, 05:11 AM
No it doesn't because I have no idea what is in

Worksheets("Sheet1").Cells(2 + C, 4).Value