Solved

Attaching Code to a form

Posted on 2002-07-11
3
161 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 50 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

Industry Leaders: 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

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

756 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