?
Solved

Attaching Code to a form

Posted on 2002-07-11
3
Medium Priority
?
165 Views
Last Modified: 2010-04-08
Hi,

I am sure most will find this extremely easy but
its bugging me.
I have created a custom contacts form. I have attached
a command button that I want to use to call a VB app.
to diplay some data. How do I attach the code to the command button on my form. I am in design view of my custom form.
I have tried clicking properties.I would welcome any suggestions at all.
Do I have to use VB Script, and can I use ordinary VB or VBA instead of VBScript.

Thanks in advance

john
0
Comment
Question by:john1982
[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 Comments
 
LVL 16

Accepted Solution

by:
Neo_mvps earned 200 total points
ID: 7145707
* Select Form | View code.

Now you just need to type 'Sub <name_of_control>_Click()' and type in your vbscript code and then finish it off with and End Sub.

Example for a command button named cmdReadData

Sub cmdReadData_Click ()
 ' Create some object if it has a COM interface
 ' read/write some data
 ' Cleanup any variables we don't need
 ' Release the the object
End Sub
0
 
LVL 44

Expert Comment

by:bruintje
ID: 7347185
Hello john1982

this question is open for more then 2 months
time to clean up
if not stated otherwise

my recom will be
-PAQ
-points to Neo_mvps
-this will be finalized by an EE Moderator
-with no further update (26.10.2002)

PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER

HAGD:O)Bruintje
posted by ToolzEE v1.0
0
 

Expert Comment

by:Jgould
ID: 7375455
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Read this checklist to learn more about the 15 things you should never include in an email signature.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
Suggested Courses

771 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