Switching computers - VBA problem

Lallo

New Member
Joined
Sep 28, 2010
Messages
44
I had a perfectly working VBA macro on my old machine, but when I switched over to a new computer, it suddenly gives an error code. :confused:

Something like this

Nr '5' Illegal procedure or argument

Things are a bit more complicated since the new machine (work computer so not installed by me) runs with Swedish language version of Office (hence the uncertainty of the exact phrasing of the error code above) , whereas my old computer runs with English ditto. Might the language of excel interfere with VBA coding? Or what is going on?

Old system:
Win XP SP3. Excel 2007 [English language]

New system:
Win 7 Professional, Excel 2007 [Swedish language]

The bit of code that causes the error is:

Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ISNUMBER(MATCH(A1,NV,0))"

where "NV" is a named range.

Any ideas?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I think the error code in English would be:

Runtime Error 5 - Illegal Function Call and Invalid Procedure
 
Upvote 0
Thanks doofusboy, but sadly it didn't help. Returns same error msg.

Seeing how I'm an economist and not a programmer, it might be something obvious - some setting or other that needs tweaking.

Hmmm...
 
Upvote 0
Further information:

It turns out that the new computer has a slightly different version of VB:

New:
MS VB: 6.3 (Version 1040, VBA: 6.5.1040) (Yes, it says 6.3 in one place and 6.5.1040 in another)

Whereas the new one has

Old:
MS VB 6.5 (Version 1053, VBA: Retail 6.5.1053)
:confused:
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,329
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top