Solved

Execute contents of object from another object

Posted on 2000-03-08
2
133 Views
Last Modified: 2010-05-02
How can I execute the code of an object from another object?
ex. command2_click()
    text1.text = "this is a test"

how can I execute the command2 object from command1?

0
Comment
Question by:jclarkmcse
[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
2 Comments
 
LVL 2

Accepted Solution

by:
Glen Richmond earned 50 total points
ID: 2597909
change the sub for the command_click from private to public

ie
private sub command2_click()

to

public sub command2_click()

now you should be able to call it ie

private sub command1_click()
        'doyour code..
        command2_click
end sub

give it a go as ive never tried this one myself..

good luck
0
 

Author Comment

by:jclarkmcse
ID: 2598521
Works great, thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

752 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