VBA Variant Arrays help.

ash.mak

New Member
Joined
Jun 29, 2010
Messages
41
Hi All,

I have following returning Run-time Error type 13. Type mismatch. I don't understand why?

dim WFMBlock1 as string
dim WFMDR1 as variant
dim Block1S , Block1E as long

Block1S=2
Block1E=19

WFMBlock1 = ActiveWorkbook.ActiveSheet.Range(Cells(5, Block1S), Cells(36, Block1E)).Address
WFMDR1 = ActiveWorkbook.ActiveSheet.Range(WFMBlock1)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Thanks Guys,

I is not working yet. I have declared those variables in the module and not the procedure. But I am using them in a procedure. Could this be the problem? If so, I do not know how to correct that. I need to keep those variables in Module because I am using them in 5 different procedures. Can you help?
 
Upvote 0
Thanks a million Andrew. You're extremely valuable person I would say.

I saved the sheet and restarted excel and added .value to the range and PRESTO!! it is working. I only need figure out who is more exhausted today, me or the PC. :eeek:
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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