Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SetCursorPosition API

Posted on 1999-07-18
5
Medium Priority
?
228 Views
Last Modified: 2008-02-01
Declare Function SetCursorPosition& Lib "user32" (ByVal x As Long, ByVal y As Long)


Private Sub Command1_Click()
t& = SetCursorPos(0, 0)
End Sub

why does this give me a "Compile error
constants arrays fixed lenght strings user defined types and declare statements not allowd as public members of object modules"
0
Comment
Question by:hess
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:Vbmaster
ID: 1525612
If you declare something in a form you need to add "Private" in front of the Declare statement.
0
 

Author Comment

by:hess
ID: 1525613
ok tahnks... let me check it out
0
 

Author Comment

by:hess
ID: 1525614
hey answer it and take the points
0
 
LVL 7

Accepted Solution

by:
Vbmaster earned 80 total points
ID: 1525615
Forgot the "Private" text in front of the declare.
0
 

Author Comment

by:hess
ID: 1525616
thankyou

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question