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)
 
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,226,837
Messages
6,193,257
Members
453,784
Latest member
Chandni

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