In my visio ap I have a single form, which calls code from the default code module (module1)
I also have a class module, which has a load of public strings, and also a public subroutine, defined as below
Public ObjClass
Public sName As String
Public ..
..
..
..
Public Sub SetData(T As Shape)
sName = T.Name
..
..
end sub
I have an array of these ObjClass objects
Now in my code module (Module1) I can write and read directly to the sName variable like so
for i = 0 to 9
Array(i).sName = "Foo"
Next
But if I try to use
for i = 0 to 9
Array(i).SetData(myObject)
Next
I get an error message 424 - object required
T is defined as an object, then set to a Shape object
Now I can get round the problem in this instance by just filling in all the data by hand, but I don't see why I shouldn't be able to do this, and all I have tried has failed (changing the Type of T, changing the type of myObject), etc
Anyone got any other ideas before I try to re-engineer my solution ?
I also have a class module, which has a load of public strings, and also a public subroutine, defined as below
Public ObjClass
Public sName As String
Public ..
..
..
..
Public Sub SetData(T As Shape)
sName = T.Name
..
..
end sub
I have an array of these ObjClass objects
Now in my code module (Module1) I can write and read directly to the sName variable like so
for i = 0 to 9
Array(i).sName = "Foo"
Next
But if I try to use
for i = 0 to 9
Array(i).SetData(myObject)
Next
I get an error message 424 - object required
T is defined as an object, then set to a Shape object
Now I can get round the problem in this instance by just filling in all the data by hand, but I don't see why I shouldn't be able to do this, and all I have tried has failed (changing the Type of T, changing the type of myObject), etc
Anyone got any other ideas before I try to re-engineer my solution ?