type 13 error mismatch

VbaHell

Well-known Member
Joined
Jan 30, 2011
Messages
1,220
Hello all

I hope you can help on this please

This code was working fine and has done for months but for some reason it has stopped working on version 2010,2003 of excel.

We keep getting an error 13 type mismatch on the line below that is highlited Bold
When I hoover over the error it points to the last line 785

Code:
[FONT=Calibri][SIZE=3][COLOR=#000000]With Sheets("Comments")[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]       arr = .Cells(1,1).Resize(.Cells(.Rows.Count, 1).End(xlUp).Row, 7).Value[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]        For x =LBound(arr, 1) To UBound(arr, 1)[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]           If dic.exists(arr(x, 1)) Then arr(x, 7) = dic(arr(x, 1))[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]        Next x[/COLOR][/SIZE][/FONT]

[B][FONT=Calibri][SIZE=3][COLOR=#000000]        .Cells(1,7).Resize(UBound(arr)).Value = Application.Index(arr, 0, 7)[/COLOR][/SIZE][/FONT][/B]
[FONT=Calibri][SIZE=3][COLOR=#000000]    End With[/COLOR][/SIZE][/FONT]
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Possible option maybe you have referenced to a later version and the older version can't find the reference. As you are only showing the With Statement its hard to tell.
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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