Sub Test()
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colQuickFixes = objWMIService.ExecQuery _
("Select * from Win32_QuickFixEngineering")
For Each objQuickFix In colQuickFixes
Cells(1, 1).Value = "Computer: "
Cells(2, 1).Value = objQuickFix.CSName
Cells(1, 2).Value = "Description: "
Cells(2, 2).Value = objQuickFix.Description
Cells(2, 3).Value = "Hot Fix ID: "
Cells(3, 3).Value = objQuickFix.HotFixID
Cells(3, 4).Value = "Installation Date: "
Cells(4, 4).Value = objQuickFix.InstallDate
Cells(4, 5).Value = "Installed By: "
Cells(5, 5).Value = objQuickFix.InstalledBy
Next
End Sub
ASKER
Visual Basic for Applications (VBA) enables building user-defined functions (UDFs), automating processes and accessing Windows API and other low-level functionality through dynamic-link libraries (DLLs). VBA is closely related to Visual Basic and uses the Visual Basic Runtime Library, but it can normally only run code within a host application rather than as a standalone program. It can, however, be used to control one application from another via OLE Automation. VBA is built into most Microsoft Office applications.
TRUSTED BY
add a variable to the rows part of the cell
for example cell(B,1)
then add a b=b+1 to in the for-next loop.
You might want to get the 'headers' out of the for-next loop