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

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default How much RAM in system?

Glad that was of some help . I wasn't aware that you were using Office 97,
what is you version of Windows? My code uses WMI and I haven't used WMI on
any Windovs prior to Win 2000. Anyway, glad to help.
--
urkec


"CLR" wrote:

OK, urkec.....just wanted to get back and let you know I got it sorted. I
used little pieces of your code in my format and all went well. I sure do
appreciate you helping me with this......
Thanks again,
Vaya con Dios,
Chuck, CABGx3

  #3   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default How much RAM in system?

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


  #4   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default How much RAM in system?

Hi urkec............Thank you very much, that works really well. I had sent
you a thank-you note some time back, but I still don't see it posted. I
guess the Ether-Gods got it somehow. Anyway, what I wanted to ask further is
if you could be so kind as to trim that down some for my need. What I'm
trying to do in Excel 97 is.......

Application.GoTo Reference:="R65000C4"
Selection.End(xlUp).Offset(1, 0).Select
Selection.Value = "TOTAL RAM HERE"

Application.GoTo Reference:="R65000C5"
Selection.End(xlUp).Offset(1, 0).Select
Selection.Value = "FREE RAM HERE"

I do very much appreciate your help.....

Vaya con Dios.
Chuck, CABGx3



"urkec" wrote:

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


  #5   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default How much RAM in system?

This machine here at work is P3 864Mhz, 512MB RAM, and has Windows XP Pro and
your code works fine on it with Excel 97, Excel 2000, and Excel 2002.

My machine at home is AMD 1.2Ghz, 512MB RAM, and has Windows Me, and your
code works fine on it with Excel 97 and Excel 2000.

The work machine is on a network. The home machine runs 4 times faster than
the work machine on Excel. The home machine also has about 100MB more free
RAM than the work machine although both have the same size RAM installed, and
only Excel is open at the time of test.

Many thanks again,
Chuck, CABGx3



"urkec" wrote:

Glad that was of some help . I wasn't aware that you were using Office 97,
what is you version of Windows? My code uses WMI and I haven't used WMI on
any Windovs prior to Win 2000. Anyway, glad to help.
--
urkec


"CLR" wrote:

OK, urkec.....just wanted to get back and let you know I got it sorted. I
used little pieces of your code in my format and all went well. I sure do
appreciate you helping me with this......
Thanks again,
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 04:31 PM.

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

About Us

"It's about Microsoft Excel"