Hi,
I have a string variable which I would like to convert to a numeric variable. For instance, the data in the string variable may be "02", I would like the numeric variable to be "2". Can't seem to quite get it.
Thanks,
Joe
I have a string variable which I would like to convert to a numeric variable. For instance, the data in the string variable may be "02", I would like the numeric variable to be "2". Can't seem to quite get it.
Thanks,
Joe
Code:
model_code = Sheet.Cells(rownum, CampaignCol).Text
model_code_txt = (Mid(model_code, 9, 2))
model_code_num = CInt(model_code_txt) 'It errors out here.
model_code_ex(rownum) = model_code_num
Sheet.Cells(rownum, 208) = model_code_ex(rownum)
Debug.Print model_code_ex(rownum)