From: ekkehard.horner on 12 Feb 2010 16:06 BNSGuy schrieb: > On Feb 12, 12:58 pm, "ekkehard.horner"<ekkehard.hor...(a)arcor.de> > wrote: >> BNSGuy schrieb: [...] >> You need a For Each loop to access WMI info: >> >> msgbox "Read the BIOS" >> For Each objBios In colBIOS >> tbMFR.Value = objBIOS.Manufacturer >> spMFR.innerhtml = objBIOS.Manufacturer >> Next [...] > Now... Why??? It seems odd to have to use a for each loop, cycling > through a each item larger number of elements if all I need is one or > two of them. Isn't there any way to access them directly? If not, > I'll just chalk it up to "Because that the way MS wants it" and walk > away, but I'd sure like to understand... [...] I assume, MS decided to do that because of the dynamic nature of the WMI thingies. Returning a snapshot/copy would give you stale information and make changes difficult.
|
Pages: 1 Prev: Outllook Object model Next: Modify a text file without make a copy |