View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Benjamin[_4_] Benjamin[_4_] is offline
external usenet poster
 
Posts: 3
Default Type mismatch when calling sub with array of worksheets argument


NickHK wrote:
So you would either need to create a true array of Worksheets
Dim WS(1 To 2) As Worksheet
Set WS(1)=Workheets(1)
Set WS(2)=Workheets(2)

or change the sub signature to accept a Variant instead of an array of WS's


Hi Nick,

thank you for the answer. Oddly enough, changing the signature to
accepting a Variant still produces the same error, but creating a true
array works. And is anyway the more proper solution, I feel.

Benjamin