Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - How to use PropExchange?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to use PropExchange?

 Post Reply Post Reply
Author
Message
Jebo View Drop Down
Senior Member
Senior Member


Joined: 27 October 2005
Location: Germany
Status: Offline
Points: 318
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jebo Quote  Post ReplyReply Direct Link To This Post Topic: How to use PropExchange?
    Posted: 28 November 2016 at 6:17am
Hello,

I'm evaluatin V17.3 and try to use the "PropExchange" object, but your example code (from Helpfile) will not work because "New" isn't possble:

Private Sub LoadData()
    Dim pxRead As New PropExchange
...

So I tried another way, but also not work...

Dim pxWr As PropExchange
Set pxWr = Xtremesuitecontrols.CreatePropExchange

pxWr.CreateAsXML False, "Test"
If pxWr.Valid Then
    pxWr.ExchangeString "Name", "Jack", ""
    pxWr.SaveToFile "B:\Test.xml"
End If

The Result is a Type mismatch error.

[Sig removed by Admin: Signature can't exceed 40GB]
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (1) Thanks(1)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2016 at 12:09pm
Hi,

About second argument of ExchangeString:  from documentation
Quote Value
Reference to a variable of type String to save data to or to retrieve data from.
So fixed code is
    Dim pxWr As PropExchange    Set pxWr = Xtremesuitecontrols.CreatePropExchange

    Dim refStr As String
    refStr = "Jack"
    
    pxWr.CreateAsXML False, "Test"
    If pxWr.Valid Then
        pxWr.ExchangeString "Name", refStr, ""
        pxWr.SaveToFile "B:\Test.xml"
    End If

about
Dim pxRead As New PropExchange
it is VB.Net

Regards,
 Oleksandr Lebed
Back to Top
Jebo View Drop Down
Senior Member
Senior Member


Joined: 27 October 2005
Location: Germany
Status: Offline
Points: 318
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jebo Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2016 at 12:12pm
> Reference to a variable of type String to save data to or to retrieve data from.
Ah YES! Thank you!
[Sig removed by Admin: Signature can't exceed 40GB]
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.