|
-
Feb 6th, 2008, 09:48 AM
#1
Thread Starter
Fanatic Member
problem in formatting comment
dear friend,
i am adding comment in my "G4" row using VBA code.becos i am reading from xml.so this is dynamic population.my comment should be like this:
i have 1000 datas. so
karhtik mano padhu mini
mani bani sara msla
daya dei gen millu
like this i need to show in comment.so please how to d olike this please show some sample code for this
-
Feb 6th, 2008, 12:00 PM
#2
Re: problem in formatting comment
 Originally Posted by karthikeyan
dear friend,
i am adding comment in my "G4" row using VBA code.becos i am reading from xml.so this is dynamic population.my comment should be like this:
i have 1000 datas. so
karhtik mano padhu mini
mani bani sara msla
daya dei gen millu
like this i need to show in comment.so please how to d olike this please show some sample code for this
I am sorry, I didn't understand. Two questions...
1) How do you decide what goes in the comment for the 1000 piece of data? or
2) Do want the above text to go as comment in all that 1000 piece of data?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Feb 6th, 2008, 12:03 PM
#3
Thread Starter
Fanatic Member
Re: problem in formatting comment
please do any one reply me please
-
Feb 6th, 2008, 12:05 PM
#4
Re: problem in formatting comment
 Originally Posted by karthikeyan
please do any one reply me please
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Feb 6th, 2008, 02:42 PM
#5
Re: problem in formatting comment
 Originally Posted by karthikeyan
please do any one reply me please
koolsid did reply, and asked two questions.
What are the answers to those questions?
-
Feb 6th, 2008, 09:13 PM
#6
Thread Starter
Fanatic Member
Re: problem in formatting comment
dear friends,
i am reading those 1000 values from xml and i have to addcomment in "G4" range and i have to populate those 1000 value in comment as like follows
ex:
karhtik mano padhu mini
mani bani sara msla
daya dei gen millu
there every names are in my xml. i can able to loop through my xml values. but i would like to add comment and pass the reading values in comment like the above example.i think now it is clear.please help me to solve this pl.......
-
Feb 7th, 2008, 04:47 AM
#7
Re: problem in formatting comment
vb Code:
range("g4").AddComment "this is" & vbnewline & "a test" & vbnewline & "to see" & vbnewline & "if it works?"
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Feb 7th, 2008, 12:15 PM
#8
Thread Starter
Fanatic Member
Re: problem in formatting comment
hi, iam looping through the xml to add comment text as follows:
Code:
Dim articleDoc As New DOMDocument
Dim NodeList As IXMLDOMNodeList
Dim sectionNode As IXMLDOMNode
Dim rng As String
Dim index As Integer
Dim comment As comment
Dim strcomment As String
Dim lngIndex As Long
Dim lngChild As Long
articleDoc.async = False
articleDoc.validateOnParse = False
articleDoc.preserveWhiteSpace = False
articleDoc.Load strFileName
Set OrgComment = Range("G4").Addcomment("Names")
Set NodeList = articleDoc.selectNodes("//Name")
For Each sectionNode In NodeList
'add values in comment
Next
so i have to add reading values from xml in comment inside the loop. i do have 1000 names in my xml.so in comment 4 names per line with some space.so show me some sample code how to do this please help me to write code inside the loop
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|