I have a string like 1234 x 4566 x 34cm x 1245666cm I get this value from excel cell and put it into variable then I want to get the value from 1 to x and then from next x to x and similarly..
I want to this
dim a as integer
dim b as integer
dim cellval as string
cellval = get the cell value
now I want this but get error
a=instr(cellval,'x')-------first x
b=instr(cellval,'x') =---------second x
msgbox Mid(cellval,a,b)-------------------------but get error....

how I can put MID(cellval,'herer instead of 1,2,3 I want to put variable')