WHEN SETTING AN OBJECT'S PROPERTY TO AN OBJECT
runtime code fails to work, but no compiler error.
Here is the code that correctly reads the cells of a worksheet
and successfully places the values into an object (verified via debugger)
FieldDataCoordinates.X = Ptr2FDWrkSht.Cells(Row, X_CoordinateColumn).value
FieldDataCoordinates.Y = Ptr2FDWrkSht.Cells(Row, Y_CoordinateColumn).value
Here is the line of code that seeks to place the above object,FieldDataCoordinates,
into an object,Ptr2FieldData,
Ptr2FieldData.Coordinates = FieldDataCoordinates
The above line executes. I can single step it through the "let" code in the Ptr2FieldData object:
Public Property Let Coordinates(value As CoordinatesClass)
Set PMeasurementCoordinates = value
End Property
When the above read code completes execution, the debugger
reveals the CoordinatesObj DID make it into the private storage of
the Coordinates property
but the debugger gives me the impression that it is not there by
indicating the public property of Ptr2FieldData.Coordinates does not exist
"object variable....not set"
Soooo....the code for reading the private data out must be at fault. I used "set" to define PMeasurementCoordinates.....do i have to something analogous in removing Coordinates?
Public Property Get Coordinates() As CoordinatesClass
set Coordinates = PMeasurementCoordinates
End Property
What does that debugger error message mean? the code did execute.
Bookmarks