RunTime Error 13:'Type Mismatch' -again


New Member
Jul 28, 2006
There are a number of posts on this and other forums regarding this error. I've now got this problem and I'm not even writing any code -per se. Two pcs: one runs XP home with office 2003, the other runs Vista 64 bit and Office 2007. In the Immediate Pane of VBA on XP/Excel 2003 typing (without quotes) "?Application.MemoryTotal <Enter>" gives me the correct total of installed RAM. Typing exactly the same command in the Immediate pane of Vista/Excel 2007 gives me a Runtime 13:Type mismatch error. This is true for the other memory system properties of the Application Object eg memoryused, memoryfree as well as memorytotal. Is it a Vista 64 bit problem or something new with Excel2007? The problem was first noticed when I tried to run a project using these properties developed under xp/2003 on the vista/2007 system.


New Member
Jul 28, 2006
Thanx for that and I will take a close look at the MSDN website but...
if 2007 doesn't support the functions I am trying to use, why does vba "suggest" them. Typing "application." brings up all the possible options and ".MemoryTotal" is one of them.
I'll keep looking. :(

Colin Legg

MrExcel MVP, Like totally RAD man
Feb 28, 2008
Hi Dave,

The Application.MemoryTotal property has been hidden in Excel 2007: it's still there but can only be seen if you have shown hidden members via the VBE object browser. This is documented in the helpfile under the topic "Object Model Changes Since Microsoft Office XP (2002)". Further evidence is that, if the Application.MemoryTotal property had been completely been removed, you would receive a different error number/message (something like RTE 438 Object doesn't support this property or method).

So it is there and it is accessible but, if I try to use Application.MemoryTotal in Excel 2007, I get the same error message as you: RTE 13 Type Mismatch. According to the link in phxsportz's post, the Application.MemoryTotal property returns a Long value. If I add a watch to it in Excel 2007, the watch window suggests Integer, so I'd pretty much say that you're bang out of luck on Excel 2007.

Hope that helps...

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...