Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mixture error
I am trying to send an array and a variable of the type Range between two
subs (it works fine without the array) but I get type error in ByVal reference. I dont get it. Code: Private Sub hittaRubriker(varWorksheetInfoArray As Variant) Dim rng1 As Range Set rng1 = Worksheets(varWorksheetInfoArray(0)).Cells.Find_(v arWorksheetInfoArray(1), LookIn:=xlValues) Call chartMaker(varWorksheetInfoArray, rng1) ........ Private Sub chartMaker(varWorksheetInfoArray As Variant, rng1 As Range) Please please help me with this!!!! I would be most greatful! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mixture error
Don't get the error. What doe the code calling hittaRubriker look like?
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Freddie Mac" wrote in message ... I am trying to send an array and a variable of the type Range between two subs (it works fine without the array) but I get type error in ByVal reference. I dont get it. Code: Private Sub hittaRubriker(varWorksheetInfoArray As Variant) Dim rng1 As Range Set rng1 = Worksheets(varWorksheetInfoArray(0)).Cells.Find_(v arWorksheetInfoArray(1), LookIn:=xlValues) Call chartMaker(varWorksheetInfoArray, rng1) ....... Private Sub chartMaker(varWorksheetInfoArray As Variant, rng1 As Range) Please please help me with this!!!! I would be most greatful! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mixture error
is rng1 always a range or can it be nothing if the .Find method finds nothing?
why not just have chartMaker run the extra lines Dim rng1 As Range Set rng1 = Worksheets(varWorksheetInfoArray(0)).Cells.Find_(v arWorksheetInfoArray(1), LookIn:=xlValues) -- www.alignment-systems.com "Freddie Mac" wrote: I am trying to send an array and a variable of the type Range between two subs (it works fine without the array) but I get type error in ByVal reference. I dont get it. Code: Private Sub hittaRubriker(varWorksheetInfoArray As Variant) Dim rng1 As Range Set rng1 = Worksheets(varWorksheetInfoArray(0)).Cells.Find_(v arWorksheetInfoArray(1), LookIn:=xlValues) Call chartMaker(varWorksheetInfoArray, rng1) ....... Private Sub chartMaker(varWorksheetInfoArray As Variant, rng1 As Range) Please please help me with this!!!! I would be most greatful! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - stop automatically changing mixture of uppercase and lowercase to propercase | Excel Worksheet Functions | |||
Currency & Accounting Format Mixture | Excel Discussion (Misc queries) | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
Data Validation - mixture of options | Excel Discussion (Misc queries) | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming |