Solved

Attaching Code to a form

Posted on 2002-07-11
3
157 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
3 Comments
 
LVL 16

Accepted Solution

by:
Neo_mvps earned 50 total points
Comment Utility
* 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
Comment Utility
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
Comment Utility
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
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…
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: …

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now