I couldn't find an MS page with those language codes, I guess there must be
one, but see here
http://wiki.services.openoffice.org/wiki/Languages
It appears the codes are Hex numbers
Maybe Excel can return what you need, in help see
Application.International(constant)
with xlCountryCode and xlCountrySetting
AFAIK the returned code is same as the international telephone dial code
(not sure about all countries)
You could try the following to return memory. The GlobalMemoryStatus API
will fail in sytems with +2gig and GlobalMemoryStatusEx is n/a in Win98.
Hopefully one or the other will work!
Private Type MEMORYSTATUSEX
dwLength As Long
dwMemoryLoad As Long
ullTotalPhys As Currency
ullAvailPhys As Currency
ullTotalPageFile As Currency
ullAvailPageFile As Currency
ullTotalVirtual As Currency
ullAvailVirtual As Currency
ullAvailExtendedVirtual As Currency
End Type
Private Declare Function GlobalMemoryStatusEx _
Lib "kernel32" (mseStatus As MEMORYSTATUSEX) As Long
Private Type MEMORYSTATUS
dwLength As Long
dwMemoryLoad As Long
dwTotalPhys As Long
dwAvailPhys As Long
dwTotalPageFile As Long
dwAvailPageFile As Long
dwTotalVirtual As Long
dwAvailVirtual As Long
End Type
Private Declare Sub GlobalMemoryStatus Lib "kernel32" ( _
lpBuffer As MEMORYSTATUS)
Sub Test()
Dim dTotPhys As Double, res As Long
Dim mem As MEMORYSTATUS
Dim MemStat As MEMORYSTATUSEX
' GlobalMemoryStatus is n/a in W98, calling it will error
On Error Resume Next
MemStat.dwLength = Len(MemStat)
'If Err.Number = 0 Then
res = GlobalMemoryStatusEx(MemStat)
If res Then
dTotPhys = MemStat.ullTotalPhys * 10000& '/ (1024& * 1024)
' don't assign 2+gig to a Long
Else
' this'll error in systems with 2+Gig memory due to Long overflow
' but unlikely in a W98 system
Call GlobalMemoryStatus(mem)
dTotPhys = mem.dwTotalPhys
End If
On Error GoTo 0
Debug.Print dTotPhys, Int(dTotPhys / (1024& * 1024)) & " Meg"
End Sub
Regards,
Peter T
Charlotte E. said:
Anyone know where to find a list of those language codes???
406 must mean Danish then
If anyone uses another language version of Excel, please, post your Locale
code here - I'm particular interested in Dutch, Polish, Russian and
Ukrainian.
Thanks for the heads up - I'll re-write the code to handle if an error
occur when using "WiNMgmts" - thanks...
<snip>