Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default How much RAM in system?

Here's another approach:


Sub SysInfo()

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


With Sheets(1)

Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem In colSettings

Cells(1, 1) = "OS Name: "
Cells(1, 2) = objOperatingSystem.Name

Cells(2, 1) = "Version: "
Cells(2, 2) = objOperatingSystem.Version

Cells(3, 1) = "Service Pack: "
Cells(3, 2) = objOperatingSystem.ServicePackMajorVersion _
& "." & objOperatingSystem.ServicePackMinorVersion

Cells(4, 1) = "OS Manufacturer: "
Cells(4, 2) = objOperatingSystem.Manufacturer

Cells(5, 1) = "Windows Directory: "
Cells(5, 2) = objOperatingSystem.WindowsDirectory

Cells(6, 1) = "Locale: "
Cells(6, 2) = objOperatingSystem.Locale

Cells(7, 1) = "Available Physical Memory: "
Cells(7, 2) = objOperatingSystem.FreePhysicalMemory

Cells(8, 1) = "Total Virtual Memory: "
Cells(8, 2) = objOperatingSystem.TotalVirtualMemorySize

Cells(9, 1) = "Available Virtual Memory: "
Cells(9, 2) = objOperatingSystem.FreeVirtualMemory

Cells(10, 1) = "Size stored in paging files: "
Cells(10, 2) = objOperatingSystem.SizeStoredInPagingFiles

Next

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

For Each objComputer In colSettings

Cells(11, 1) = "System Name: "
Cells(11, 2) = objComputer.Name

Cells(12, 1) = "System Manufacturer: "
Cells(12, 2) = objComputer.Manufacturer

Cells(13, 1) = "System Model: "
Cells(13, 2) = objComputer.Model

Cells(14, 1) = "Total Physical Memory: "
Cells(14, 2) = objComputer.TotalPhysicalMemory

Next

End With

End Sub

Using simmilar technique you can get most of hardware and software info

--
urkec


"CLR" wrote:

Thanks for the response John, but that's not what I'm after.
I'm trying to identify the total amount of Installed RAM...........

Vaya con Dios,
Chuck, CABGx3



"John" wrote:

try =INFO("memavail")
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"CLR" wrote:

Hi All.........
Could someone please give me the code to return the amount of RAM installed
on the system?

TIA
Vaya con Dios,
Chuck, CABGx3


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert military date system to standard date system John Weaver Excel Discussion (Misc queries) 8 September 17th 09 06:12 PM
How do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
Error varying from System to System wilro85[_18_] Excel Programming 7 July 19th 06 06:26 PM
help system scottrenz Excel Programming 0 March 17th 06 08:20 PM
excel causing system to be in low system resource inenewbl Excel Discussion (Misc queries) 0 April 5th 05 04:11 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"