ok im trying to find out how CallByName works because i want to be able to use just a string to change/get a value from a object.
You (need) an object as object
i want to use a number or (pointer) insted of the object!
or i would like to know how CallByName uses the object....
CallByName (object as object, string, callType, value)
'a string of objects and =
strsing = "objectvar.Show_item_values.caption = 1"
'build a list of the objects
oldtonext = 1
For a = 1 To 5 'only need
tonext = InStr(oldtonext, strsing, ".")
If tonext = 0 Then
tonext = InStr(oldtonext, strsing, " ")
If tonext = 0 Then Exit For 'error
End If
Tobject(a) = Mid(strsing, oldtonext, tonext - oldtonext)
oldtonext = tonext + 1
Next a
'Find what the object =
'if number
If InStr(1, strsing, "= ") > 0 Then TobjectE = Mid(strsing, InStr(1, strsing, "= ") + 2, Len(strsing) - InStr(1, strsing, "= "))
'if string
If InStr(1, strsing, "=$ ") > 0 Then TobjectE = Mid(strsing, InStr(1, strsing, "=$ ") + 3, (Len(strsing) - InStr(1, strsing, "=$ ") + 3) - 1)
Dim asdsa As Object
Set asdsa = objectVAR 'Tobject(1) ####this is where it happons
CallByName asdsa, Tobject(2) + "." + Tobject(3), VbSet, TobjectE
