How to check Physical Memory (RAM) DDR type by Excel/Access vba?












1















Is there any way to get physical memory DDR information like DDR3 or DDR4 by Excel/Access VBA. My below sub give me details about physical memory but do not give any DDR information.



Sub RAMDetails()
Dim oWMISrvEx As Object
Dim oWMIObjSet As Object
Dim oWMIObjEx As Object
Dim oWMIProp As Object
Dim sWQL As String
Dim n

Dim sht As Worksheet

Set sht = ThisWorkbook.Sheets("Sheet1")

sWQL = "Select * From Win32_PhysicalMemory"


Set oWMISrvEx = GetObject("winmgmts:root/CIMV2")
Set oWMIObjSet = oWMISrvEx.ExecQuery(sWQL)
intRow = 2
strRow = Str(intRow)

sht.Range("A1").Value = "Name"
sht.Cells(1, 1).Font.Bold = True

sht.Range("B1").Value = "Value"
sht.Cells(1, 2).Font.Bold = True

For Each oWMIObjEx In oWMIObjSet
For Each oWMIProp In oWMIObjEx.Properties_
If Not IsNull(oWMIProp.Value) Then

If IsArray(oWMIProp.Value) Then
For n = LBound(oWMIProp.Value) To UBound(oWMIProp.Value)
Debug.Print oWMIProp.Name & "(" & n & ")", oWMIProp.Value(n)
sht.Range("A" & Trim(strRow)).Value = oWMIProp.Name
sht.Range("B" & Trim(strRow)).Value = oWMIProp.Value(n)
sht.Range("B" & Trim(strRow)).HorizontalAlignment = xlLeft
intRow = intRow + 1
strRow = Str(intRow)
Next

Else
sht.Range("A" & Trim(strRow)).Value = oWMIProp.Name
sht.Range("B" & Trim(strRow)).Value = oWMIProp.Value
sht.Range("B" & Trim(strRow)).HorizontalAlignment = xlLeft
intRow = intRow + 1
strRow = Str(intRow)
End If

End If
Next
Next
End Sub









share|improve this question




















  • 1





    IMO it does, look at the memory type and decide based on this document. If memory type is equal 24 then you've got DDR3 and if it's 21 or 22 than you've got DDR2. DDR4 is not documented or not supported I guess but I do not know for sure.

    – Storax
    Nov 24 '18 at 15:14











  • @Storax Let me check and know.

    – Harun24HR
    Nov 24 '18 at 15:19
















1















Is there any way to get physical memory DDR information like DDR3 or DDR4 by Excel/Access VBA. My below sub give me details about physical memory but do not give any DDR information.



Sub RAMDetails()
Dim oWMISrvEx As Object
Dim oWMIObjSet As Object
Dim oWMIObjEx As Object
Dim oWMIProp As Object
Dim sWQL As String
Dim n

Dim sht As Worksheet

Set sht = ThisWorkbook.Sheets("Sheet1")

sWQL = "Select * From Win32_PhysicalMemory"


Set oWMISrvEx = GetObject("winmgmts:root/CIMV2")
Set oWMIObjSet = oWMISrvEx.ExecQuery(sWQL)
intRow = 2
strRow = Str(intRow)

sht.Range("A1").Value = "Name"
sht.Cells(1, 1).Font.Bold = True

sht.Range("B1").Value = "Value"
sht.Cells(1, 2).Font.Bold = True

For Each oWMIObjEx In oWMIObjSet
For Each oWMIProp In oWMIObjEx.Properties_
If Not IsNull(oWMIProp.Value) Then

If IsArray(oWMIProp.Value) Then
For n = LBound(oWMIProp.Value) To UBound(oWMIProp.Value)
Debug.Print oWMIProp.Name & "(" & n & ")", oWMIProp.Value(n)
sht.Range("A" & Trim(strRow)).Value = oWMIProp.Name
sht.Range("B" & Trim(strRow)).Value = oWMIProp.Value(n)
sht.Range("B" & Trim(strRow)).HorizontalAlignment = xlLeft
intRow = intRow + 1
strRow = Str(intRow)
Next

Else
sht.Range("A" & Trim(strRow)).Value = oWMIProp.Name
sht.Range("B" & Trim(strRow)).Value = oWMIProp.Value
sht.Range("B" & Trim(strRow)).HorizontalAlignment = xlLeft
intRow = intRow + 1
strRow = Str(intRow)
End If

End If
Next
Next
End Sub









share|improve this question




















  • 1





    IMO it does, look at the memory type and decide based on this document. If memory type is equal 24 then you've got DDR3 and if it's 21 or 22 than you've got DDR2. DDR4 is not documented or not supported I guess but I do not know for sure.

    – Storax
    Nov 24 '18 at 15:14











  • @Storax Let me check and know.

    – Harun24HR
    Nov 24 '18 at 15:19














1












1








1








Is there any way to get physical memory DDR information like DDR3 or DDR4 by Excel/Access VBA. My below sub give me details about physical memory but do not give any DDR information.



Sub RAMDetails()
Dim oWMISrvEx As Object
Dim oWMIObjSet As Object
Dim oWMIObjEx As Object
Dim oWMIProp As Object
Dim sWQL As String
Dim n

Dim sht As Worksheet

Set sht = ThisWorkbook.Sheets("Sheet1")

sWQL = "Select * From Win32_PhysicalMemory"


Set oWMISrvEx = GetObject("winmgmts:root/CIMV2")
Set oWMIObjSet = oWMISrvEx.ExecQuery(sWQL)
intRow = 2
strRow = Str(intRow)

sht.Range("A1").Value = "Name"
sht.Cells(1, 1).Font.Bold = True

sht.Range("B1").Value = "Value"
sht.Cells(1, 2).Font.Bold = True

For Each oWMIObjEx In oWMIObjSet
For Each oWMIProp In oWMIObjEx.Properties_
If Not IsNull(oWMIProp.Value) Then

If IsArray(oWMIProp.Value) Then
For n = LBound(oWMIProp.Value) To UBound(oWMIProp.Value)
Debug.Print oWMIProp.Name & "(" & n & ")", oWMIProp.Value(n)
sht.Range("A" & Trim(strRow)).Value = oWMIProp.Name
sht.Range("B" & Trim(strRow)).Value = oWMIProp.Value(n)
sht.Range("B" & Trim(strRow)).HorizontalAlignment = xlLeft
intRow = intRow + 1
strRow = Str(intRow)
Next

Else
sht.Range("A" & Trim(strRow)).Value = oWMIProp.Name
sht.Range("B" & Trim(strRow)).Value = oWMIProp.Value
sht.Range("B" & Trim(strRow)).HorizontalAlignment = xlLeft
intRow = intRow + 1
strRow = Str(intRow)
End If

End If
Next
Next
End Sub









share|improve this question
















Is there any way to get physical memory DDR information like DDR3 or DDR4 by Excel/Access VBA. My below sub give me details about physical memory but do not give any DDR information.



Sub RAMDetails()
Dim oWMISrvEx As Object
Dim oWMIObjSet As Object
Dim oWMIObjEx As Object
Dim oWMIProp As Object
Dim sWQL As String
Dim n

Dim sht As Worksheet

Set sht = ThisWorkbook.Sheets("Sheet1")

sWQL = "Select * From Win32_PhysicalMemory"


Set oWMISrvEx = GetObject("winmgmts:root/CIMV2")
Set oWMIObjSet = oWMISrvEx.ExecQuery(sWQL)
intRow = 2
strRow = Str(intRow)

sht.Range("A1").Value = "Name"
sht.Cells(1, 1).Font.Bold = True

sht.Range("B1").Value = "Value"
sht.Cells(1, 2).Font.Bold = True

For Each oWMIObjEx In oWMIObjSet
For Each oWMIProp In oWMIObjEx.Properties_
If Not IsNull(oWMIProp.Value) Then

If IsArray(oWMIProp.Value) Then
For n = LBound(oWMIProp.Value) To UBound(oWMIProp.Value)
Debug.Print oWMIProp.Name & "(" & n & ")", oWMIProp.Value(n)
sht.Range("A" & Trim(strRow)).Value = oWMIProp.Name
sht.Range("B" & Trim(strRow)).Value = oWMIProp.Value(n)
sht.Range("B" & Trim(strRow)).HorizontalAlignment = xlLeft
intRow = intRow + 1
strRow = Str(intRow)
Next

Else
sht.Range("A" & Trim(strRow)).Value = oWMIProp.Name
sht.Range("B" & Trim(strRow)).Value = oWMIProp.Value
sht.Range("B" & Trim(strRow)).HorizontalAlignment = xlLeft
intRow = intRow + 1
strRow = Str(intRow)
End If

End If
Next
Next
End Sub






excel vba excel-vba






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 13:19









Lee Mac

4,77031541




4,77031541










asked Nov 24 '18 at 13:10









Harun24HRHarun24HR

4,0682720




4,0682720








  • 1





    IMO it does, look at the memory type and decide based on this document. If memory type is equal 24 then you've got DDR3 and if it's 21 or 22 than you've got DDR2. DDR4 is not documented or not supported I guess but I do not know for sure.

    – Storax
    Nov 24 '18 at 15:14











  • @Storax Let me check and know.

    – Harun24HR
    Nov 24 '18 at 15:19














  • 1





    IMO it does, look at the memory type and decide based on this document. If memory type is equal 24 then you've got DDR3 and if it's 21 or 22 than you've got DDR2. DDR4 is not documented or not supported I guess but I do not know for sure.

    – Storax
    Nov 24 '18 at 15:14











  • @Storax Let me check and know.

    – Harun24HR
    Nov 24 '18 at 15:19








1




1





IMO it does, look at the memory type and decide based on this document. If memory type is equal 24 then you've got DDR3 and if it's 21 or 22 than you've got DDR2. DDR4 is not documented or not supported I guess but I do not know for sure.

– Storax
Nov 24 '18 at 15:14





IMO it does, look at the memory type and decide based on this document. If memory type is equal 24 then you've got DDR3 and if it's 21 or 22 than you've got DDR2. DDR4 is not documented or not supported I guess but I do not know for sure.

– Storax
Nov 24 '18 at 15:14













@Storax Let me check and know.

– Harun24HR
Nov 24 '18 at 15:19





@Storax Let me check and know.

– Harun24HR
Nov 24 '18 at 15:19












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53458479%2fhow-to-check-physical-memory-ram-ddr-type-by-excel-access-vba%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53458479%2fhow-to-check-physical-memory-ram-ddr-type-by-excel-access-vba%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen