• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3730
  • Last Modified:

Get computer system and hardware information using Exel VBA

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
jbirkku
Asked:
jbirkku
  • 2
  • 2
1 Solution
 
athomsfereCommented:
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
 
jbirkkuAuthor Commented:
Thanks!  I could find everything except for the amount of RAM installed.  Using WMI, Do you know where I could find that information?
0
 
jbirkkuAuthor Commented:
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
 
athomsfereCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now