?
Solved

Still on ActiveX documents

Posted on 2003-04-01
3
Medium Priority
?
214 Views
Last Modified: 2010-05-01
''''''''''''''''''''''''''''
'Codes in Module1.bas
''''''''''''''''''''''''''''
Option Explicit
Public oDoc1 As UserDocument1

Public Sub Main()

End Sub
''''''''''''''''''''''''''''

''''''''''''''''''''''''''''
'Codes in UserDocument1.vbd
''''''''''''''''''''''''''''
Option Explicit
Private mvarUser    As String

Public Static Property Get User() As String
    If IsObject(mvarUser) Then
        User = mvarUser
    Else
        User = mvarUser
    End If
End Property

Public Static Property Let User(ByVal vNewValue As String)
    mvarUser = vNewValue
End Property

Private Sub Command1_Click()
    User = Text1.Text 'contains some text
    Hyperlink.NavigateTo App.Path & "\UserDocument2.vbd"
End Sub
''''''''''''''''''''''''''''


''''''''''''''''''''''''''''
'Codes in UserDocument2.vbd
''''''''''''''''''''''''''''
Option Explicit

Private Sub UserDocument_Show()
   If Not oDoc1 Is Nothing Then
      Text1.Text = oDoc1.User  'expect to pick my text from UserDocument2.vbd which is to be displayed on a Text1 on UserDocument1.vbd
      MsgBox oDoc1.User
      Set oDoc1 = Nothing
   End If
End Sub
''''''''''''''''''''''''''''

Nothing is saved on the User property.
Urgent got to meet a deadline
0
Comment
Question by:tiha
3 Comments
 
LVL 2

Accepted Solution

by:
AKbor75 earned 75 total points
ID: 8244740
as far as i know properties can only be used on class modules (i may be wrong about this).
so if i want to exchange settings between forms, i use global variabeles (in a module) or an ini file.
i think an ini file is the best option, cos that is easy and always works.
0
 

Expert Comment

by:CleanupPing
ID: 8531204
Hi tiha,
This old question (QID 20569875) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
LVL 77

Expert Comment

by:GrahamSkan
ID: 9046615
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Akbor75's comment as answe6

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GrahamSkan
EE Cleanup Volunteer
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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.
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 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…

615 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