LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Select Case Type Mismatch

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Type Mismatch: array or user defined type expected ExcelMonkey Excel Programming 4 July 6th 06 03:40 PM
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Type Mismatch Error when running a SELECT SQL Andy Dorph Excel Programming 1 February 9th 05 06:12 PM
Case when statement gives type mismatch Henrik[_6_] Excel Programming 2 June 16th 04 04:36 PM


All times are GMT +1. The time now is 11:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"