I have a fairly simple macro that populates a variant array with both text and numbers. It works fine on my PC but not on my brothers, who's PC is new (using the same file/macro). I have checked the excel versions and they are the same (2016 MSO 16.0.7571.7095) 32 bit, also the culture is the same - 1033 for both. The error is run time 13 - Type mismatch. The windows are different though, 8.1 vs 10 - could it be that?
This is the only proper post I could find on the topic: I receive a type-mismatch error from VBA on one computer, but not on others. Why?
This is the code line on which the error is created:
prArray(i, 1) = CDbl(Mid(prArray(i, O), 11, 7))
I am stuck. Any help would be much appreciated. Thanks
After some frustration it is an easy fix after all, and comes down to "Culture on the problem PC" as answered here: I receive a type-mismatch error from VBA on one computer, but not on others. Why? . For interest, I checked the excel culture/language with this code:
All that was necessary was to change the language settings of the PC itself at Control Panel > Clock, Language and Region > Language, to US English (it was different at the problem PC).