[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Get computer system and hardware information using Exel VBA

Posted on 2012-08-30
4
Medium Priority
?
3,518 Views
Last Modified: 2012-08-31
I'm trying write a macro to get my computer system and hardware information.  Currently, I have the below code.  However, it doesn't provide the graphic card information, and computer information like processor speed, amount of RAM (ex. Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53 GHz, 3.45 GB of RAM, etc..).  Is there a way to do this?

Thanks.

Sub GetCInfo()
Dim i As Long, y As String, count As Variant
count = 1

For i = 1 To 39
 Range("A" & count) = Environ(i)
 count = count + 1
Next

End Sub
0
Comment
Question by:jbirkku
  • 2
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
athomsfere earned 1500 total points
ID: 38351775
You can use WMI.
I am not a huge user of VBA, so all I can give you is a guide to the overall WMI.
http://accesstips.wordpress.com/2009/05/18/using-the-power-of-vbscripts-in-microsoft-access-vba/

You can then use something like this http://www.codeproject.com/Articles/380148/WMI-Code-Creator-For-Windows-Forms-for-VB-NET

To find the specific parts of the PC you care about, and then edit your code for what you want. I could not find the WMI Code Creator I use, but this should work just as well.
0
 

Author Comment

by:jbirkku
ID: 38352829
Thanks!  I could find everything except for the amount of RAM installed.  Using WMI, Do you know where I could find that information?
0
 

Author Closing Comment

by:jbirkku
ID: 38352833
Thanks!  I could find all the information I needed except for the amount of RAM installed.  Using WMI, Do you know where I can find this information?
0
 
LVL 14

Expert Comment

by:athomsfere
ID: 38353614
RAM is in a few places, but its stored as bytes.I believe it is in system, BIOS among others. Once you have it, you then need to truncated the number, round it or do the real math to covert it from 3.45 billion bytes (3450000000000) to a gb form.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question