Hello,

The subject has already been discussed but I did not understand anything and I do not find the solution to my problem.

The solution is certainly here in this forum but I did not find it.

I hope my question will be clear because I have a little trouble explaining it.

When I pass a variable (class) to a function without using ByRef the variable returns modified.

First I do not understand this principle and secondly how to return the variable unchanged?

How to assign my variable again to its starting value?

Exemple:

Class Ptxy x As Integer y As Integer ---------------------------------------- Call Dim Pt As Ptxy Dim i As Integer Pt = New Ptxy Pt.x = 1 Pt.y = 2 i = Method(Pt) ---------------------------------------- Method( Pt As Ptxy ) Integer Dim Pt1 As Ptxy Pt1 = Pt Pt1.x = 5 Pt1.y = 10 i = 5 Return i

Pt changes in the call function in (5,10) while I want to keep (1,2)

Where and how to keep the starting value (1,2)?

Thanks for your help.

BB