VB6 Module Public Var Xojo Equiv

Hi,

Perhaps a simple question but I am porting a small app from VB6 to Xojo. The VB6 app has a module with some public variables declared. I used the Xojo VB6 migration tool and have worked through including setting up those variables as Public scope Xojo module properties. When I try to access them from a form:

'// Set the # of equations to # of unknowns modMatrix.Eq = c

I get a ‘This item does not exist error’. I have a sneaking suspicion that I’m overlooking something very basic :slight_smile:

Thanks in advance,
Steve

EDIT: modMatrix is the name of the Xojo module. Intellisense shows that Eq is a property of the module.

and what is the SCOPE of “EG”? global? private?

Public. I think your question has nade me realise that the Xojo converter changed a VB6 module to a class as there are Super and Interface properties on it.

Away from desk atm but that seems plain confusing to change the type.

Steve

The converter doesnt do a great job FWIW

if it is a class now by the converter its more like
dim m as new modMatrix
m.Eq = c
a vb6 modul should be equivalent to a modul in xojo …
it was really a modul in vb6? should have file extension .bas , a class would be .cls
btw global variables in vb6 is not a good thing.

Yes it was a VB6 module and tge converter changed to a class. Yes am aware of the extensions and also global vars. It was POC code being converted to Xojo.

if you will leave it in a class and the variable is only used once you can use the Shared Property.
the access would look like:

Class1.MyValue = 5 System.DebugLog Str(Class1.MyValue)

Thanks Markus. That’s what I did - change them to shared to get it to work.