Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to accept a value from VBA
Message
De
08/01/2002 23:33:11
 
 
À
07/01/2002 03:05:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00601380
Message ID:
00602357
Vues:
20
Hi Pablo,

I did the following as you advised.

·Created a new project (VBAtoVFP) in Visual Foxpro.
·Add a new class ( Lib – VFPClasses Class – VFPClass)
·Add a public property (GcSOKey - character type )
·Add a public method ( ChangeCommValues). Method is still empty . I haven’t added any code .
·In class menu, class info , I checked OLE Public check box.
·Saved the class and compiled it with ‘Single threaded com server – dll ‘
·It created a DLL, VBAtoVFP.dll ( not the class name but the project name)


*-------------------------------------------------------------------------------

In my VBA project I did the following.

·In VBA reference section I selected ‘VBAtoVFP Type Libruary ‘ . It was already there. I just checked it.
·In my VBA coding I typed this.

Dim VFPObj As New vfpclass

Public Sub EDIT()

Dim lcSOkey As String

' First get the SOKey value from VBA

lcSOkey = ‘12345’

‘ Assign the SOKey value to property in VFP project
VFPObj.GCSOKEY = lcSOkey

‘ Do a test in VBA
MsgBox VFPObj.GCSOKEY ‘ This displays 12345. So far so good . Now I need to pass this value to my method.

VFPObj.changecommvalues

*--------------------------------------------------------------

ALLRight !!!! now comes my questions…

1.How do I refer this value in my VFP method . ? ( All what I need to to know at this point is whether SoKey value is correctly passed to my method.)

2.Do I need to use a parameter in my method ?

In my method (ChangeCommValues) I tried something like this

Wait Window "Your VFP So Key Value Is :" + This.gcSOKey && didn’t work.

PLEASE HELP !!!!!

TIA

- Jeana -
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform