PC Review


Reply
Thread Tools Rate Thread

Cell variable

 
 
Oscar R
Guest
Posts: n/a
 
      14th Jan 2008
I'm creating a hardware asset spreadsheet. I have the computers names a
column and I'm trying to create a function to connect to the computers via
WMI and return hardware information (ie. manufacturer) to another cell.

Function GetManufacturer()

strComputer = ""
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
& strComputer & "\root\cimv2")


Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")

For Each objItem In colItems

GetManufacturer = objItem.Manufacturer

Next

End Function

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering variable value in cell to right of 2nd variable CompleteNewb Microsoft Excel Discussion 3 23rd Sep 2007 07:53 PM
Sum a column using fixed start cell and variable end cell =?Utf-8?B?TmlnZWw=?= Microsoft Excel Programming 2 13th Jul 2007 07:40 AM
Running a variable macro when any value is entered into a variable cell IP Microsoft Excel Programming 3 14th Dec 2005 05:15 PM
Linking a cell to another workbook cell based on a variable name =?Utf-8?B?QnJpYW4=?= Microsoft Excel Misc 6 1st Jun 2005 11:54 PM
How to copy formatting when moving from cell to variable to another cell on another worksheet kls Microsoft Excel Programming 1 11th Sep 2004 10:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:00 AM.