Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - stop automatically changing mixture of uppercase and lowercase to propercase Harry Flashman Excel Worksheet Functions 3 May 18th 23 11:41 AM
Currency & Accounting Format Mixture pmsimp Excel Discussion (Misc queries) 2 May 27th 09 08:58 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Data Validation - mixture of options Jack Sheet Excel Discussion (Misc queries) 6 May 20th 05 03:54 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM


All times are GMT +1. The time now is 04:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"