I am trying to write an application that will be able to display set computer information in a span however i keep getting the error message Object required.
Code: Select all
Sub GetGeneral
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & strComputer & "rootcimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
strHtml = strHtml & " Operating System: " & objOperatingSystem.Caption & ""
strHtml = strHtml & " Service Pack: " & objOperatingSystem.ServicePackMajorVersion & ""
DataArea1.InnerHtml = strHtml
End Sub
I think the rest of the code is okay apart from the above.
Any suggestion what is wrong here? as im fairly new to this i can't figure it out.
Cheers.