Solved

Forms in VB5 Dlls

Posted on 1997-06-01
1
129 Views
Last Modified: 2006-11-17
I 've created a form(form1) and placed it in an ActiveX dll project.

in Class1 I've delcared the form as a property of the class:
private F as form1

in Class1_Initialize I create the instance..

set F = new form1

Now the question is, when the user interacts with the form, how can write changes the user made on the form back to the other properties of Class1. (for examble a button on the form changes the value of Class1.SomeProperty

Dave  
0
Comment
Question by:Hitman
1 Comment
 
LVL 3

Accepted Solution

by:
dansari earned 100 total points
ID: 1426675
In form1, declare a variable of type Class1 (say it's moClass), and make a property Set procedure in form1 something like this:

Property Set Class (oClass as Class1)
   Set moClass = oClass
End Property

In Class1_Initialize, after your 'Set F' statement, put in another statement:

Set F.Class = me

Then, whenever anything in form1 changes, you can access and set variables or properties of moClass.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

707 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

12 Experts available now in Live!

Get 1:1 Help Now