Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mouse_down

Status
Not open for further replies.

andreas57

Technical User
Sep 29, 2000
110
CH
i would like to make an action if somebody clicks with the mouse on certen koordinates

i always get the error: expect expression

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case setzten
Case 1: x>=240 and x<=1200 and y>=720 and y<=1680
case 2: x>=240 and x<=1200 and y>=1690 and y<=2640
End Select
End Sub

what am i doing wrong

andreas owen
aowen@swissonline.ch
 
the select case is bad

select case setzten
case 1
''''''stuff here will execute if setzten=1
case &quot;hello&quot;
'''''stuff here will execute if setzten=&quot;hello&quot;
case variable
''''stuff here will execute if setzten= variable
end select

i think you should just go with an if then elseif statement

if x>=240 and x<=1200 and y>=720 and y<=1680 then
'''''do stuff
elseif x>=240 and x<=1200 and y>=1690 and y<=2640
'''''do other stuff
elseif x>=12 and x<=124 and y>=4 and y<=24
''''do yet other stuff
endif


hope that helps. if not email me and ill try and explain it better
Karl Pietri
lordhuh@home.com

Karl Pietri
lordhuh.pota.to

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top