Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Collection Object output formatting question

Status
Not open for further replies.

chouck

MIS
Jan 30, 2005
32
US
Hi All,

I'm not sure if I will explain this correctly but here goes... I am trying to display the description of the modem that is installed see code:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colobj = objWMIService.ExecQuery _
("SELECT * FROM Win32_POTSModem")
for each objitem in colobj
wscript.echo objitem.description
next

the problem is that if someone has more than one modem installed it shows up as 2 seperate pop ups.

The main question here is, is there a way that you can show all items in the collection on one pop up?

Thanks in advance
 
for each objitem in colobj
x = x & objitem.description & vbCrLf
next
wscript.echo x


Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top