K
Ken
I have a "Select Case" arrangement (below) and it is giving me a Type
mismatch error. This is based on a user form.
I tried using the Val() on the two numbers with no results. The variable
deptx,y is previously populated and works.
any help is greatly appreciated.
SELECT CASE Frm_Locations_UnBound.Side AND
Frm_Locations_UnBound.DeptFromRefX AND Frm_Locations_UnBound.DeptFromRefY
Case Is = "R", Is > 0, Is > 0 'NE Quad Right
deptx = deptx
depty = depty * -1
Case Is = "L", Is > 0, Is > 0 'NE Quad Left
deptx = deptx * -1
depty = depty
Case Is = "R", Is > 0, Is < 0 'SE Quad Right
deptx = deptx * -1
depty = depty * -1
Case Is = "L", Is > 0, Is < 0 'SE Quad Left
deptx = deptx
depty = depty
Case Is = "R", Is < 0, Is < 0 'SW Quad Right
deptx = deptx * -1
depty = depty
Case Is = "L", Is < 0, Is < 0 'SW Quad Left
deptx = deptx
depty = depty * -1
Case Is = "R", Is < 0, Is > 0 'NW Quad Right
deptx = deptx
depty = depty * -1
Case Is = "L", Is < 0, Is > 0 'NW Quad Left
deptx = deptx * -1
depty = depty * -1
End Select
mismatch error. This is based on a user form.
I tried using the Val() on the two numbers with no results. The variable
deptx,y is previously populated and works.
any help is greatly appreciated.
SELECT CASE Frm_Locations_UnBound.Side AND
Frm_Locations_UnBound.DeptFromRefX AND Frm_Locations_UnBound.DeptFromRefY
Case Is = "R", Is > 0, Is > 0 'NE Quad Right
deptx = deptx
depty = depty * -1
Case Is = "L", Is > 0, Is > 0 'NE Quad Left
deptx = deptx * -1
depty = depty
Case Is = "R", Is > 0, Is < 0 'SE Quad Right
deptx = deptx * -1
depty = depty * -1
Case Is = "L", Is > 0, Is < 0 'SE Quad Left
deptx = deptx
depty = depty
Case Is = "R", Is < 0, Is < 0 'SW Quad Right
deptx = deptx * -1
depty = depty
Case Is = "L", Is < 0, Is < 0 'SW Quad Left
deptx = deptx
depty = depty * -1
Case Is = "R", Is < 0, Is > 0 'NW Quad Right
deptx = deptx
depty = depty * -1
Case Is = "L", Is < 0, Is > 0 'NW Quad Left
deptx = deptx * -1
depty = depty * -1
End Select