Click here to Skip to main content
15,844,155 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSimple But Professional Visual Basic Auto Typer Pin
ThomasEngine113-May-21 8:46
ThomasEngine113-May-21 8:46 
AnswerRe: Simple But Professional Visual Basic Auto Typer Pin
Dave Kreskowiak13-May-21 10:00
mveDave Kreskowiak13-May-21 10:00 
Questionget colour at pixel Pin
ducpkh22-Apr-21 5:40
ducpkh22-Apr-21 5:40 
AnswerRe: get colour at pixel Pin
Richard Deeming22-Apr-21 6:00
mveRichard Deeming22-Apr-21 6:00 
AnswerRe: get colour at pixel Pin
Dave Kreskowiak22-Apr-21 7:02
mveDave Kreskowiak22-Apr-21 7:02 
AnswerRe: get colour at pixel Pin
Ralf Meier22-Apr-21 23:12
professionalRalf Meier22-Apr-21 23:12 
AnswerRe: get colour at pixel Pin
Eddy Vluggen3-May-21 7:49
professionalEddy Vluggen3-May-21 7:49 
QuestionVBA add child and 2 attributes Pin
mhnCPF2-Apr-21 18:29
mhnCPF2-Apr-21 18:29 
This is a snippet of an xml file I need to add a child to:
<ClientData>
		<prop name="CGuid" type="0">403131A1-95D</prop>
		<prop name="CState" type="0">CA</prop>
		<prop name="CFName1" type="0">Lily</prop>
		<prop name="CLName1" type="0"></prop>
		<prop name="CEmail" type="0">lily@13.com</prop>
	</ClientData>

I need to add "CEmail2", CEmail3" etc, etc to this group.
Using a xml file viewer I manually did this by doing 3 steps:
Add child to <clientdata> named "prop"
Add attribute to prop Name="Name",Value="CEmail2"
add attribute to prop Name="type', Value="0"


Currently, I am writing to existing nodes using the following:
Dim DOM As MSXML2.DOMDocument
    Dim Node As MSXML2.IXMLDOMNode
    Set DOM = New MSXML2.DOMDocument


With DOM
        .async = False
        .preserveWhiteSpace = True
    If .Load("C:\HouseMaster\CloneRPT.hr4") Then
            .setProperty "SelectionLanguage", "XPath"
        Set Node = .SelectSingleNode("//ClientData/prop[@name='CEmail']")
                Node.Text = "Someone@aol.com"

<pre>    End If
    End With


I believe that I neded to use CreateChild() but how do I add the attributes as I did manually in VBA?
Thanks for your help
AnswerRe: VBA add child and 2 attributes Pin
Richard Deeming6-Apr-21 1:31
mveRichard Deeming6-Apr-21 1:31 
GeneralVBA add child and 2 attributes Pin
mhnCPF6-Apr-21 10:30
mhnCPF6-Apr-21 10:30 
QuestionWinForms RDLC Chart Object, Sizes to Screen Zoom level on print, bug, setting or can be fixed with more code? Pin
jkirkerx2-Apr-21 7:24
professionaljkirkerx2-Apr-21 7:24 
AnswerRe: WinForms RDLC Chart Object, Sizes to Screen Zoom level on print, bug, setting or can be fixed with more code? Pin
jkirkerx2-Apr-21 10:45
professionaljkirkerx2-Apr-21 10:45 
QuestionLogin form using Oracle Stored Procedure with return value Pin
kerek228-Mar-21 23:05
kerek228-Mar-21 23:05 
AnswerRe: Login form using Oracle Stored Procedure with return value Pin
Richard Deeming28-Mar-21 23:23
mveRichard Deeming28-Mar-21 23:23 
GeneralRe: Login form using Oracle Stored Procedure with return value Pin
kerek229-Mar-21 16:50
kerek229-Mar-21 16:50 
GeneralRe: Login form using Oracle Stored Procedure with return value Pin
Richard Deeming29-Mar-21 22:24
mveRichard Deeming29-Mar-21 22:24 
AnswerRe: Login form using Oracle Stored Procedure with return value Pin
Victor Nijegorodov29-Mar-21 1:46
Victor Nijegorodov29-Mar-21 1:46 
GeneralRe: Login form using Oracle Stored Procedure with return value Pin
kerek229-Mar-21 16:52
kerek229-Mar-21 16:52 
AnswerRe: Login form using Oracle Stored Procedure with return value Pin
CHill6029-Mar-21 4:23
mveCHill6029-Mar-21 4:23 
QuestionHow to pack files xml with the format TAR in Visual Basic 6 Pin
LeMarS23-Mar-21 13:36
LeMarS23-Mar-21 13:36 
AnswerRe: How to pack files xml with the format TAR in Visual Basic 6 Pin
Dave Kreskowiak23-Mar-21 18:00
mveDave Kreskowiak23-Mar-21 18:00 
AnswerRe: How to pack files xml with the format TAR in Visual Basic 6 Pin
Eddy Vluggen24-Mar-21 6:22
professionalEddy Vluggen24-Mar-21 6:22 
QuestionGet Encoding of LibreOffice from VBA code Pin
Member 1510681118-Mar-21 7:24
Member 1510681118-Mar-21 7:24 
AnswerRe: Get Encoding of LibreOffice from VBA code Pin
Dave Kreskowiak19-Mar-21 14:05
mveDave Kreskowiak19-Mar-21 14:05 
GeneralRe: Get Encoding of LibreOffice from VBA code Pin
Eddy Vluggen24-Mar-21 6:24
professionalEddy Vluggen24-Mar-21 6:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.