Run-time Error '438': Object doesn't support this property or method

  • Thread starter Thread starter mika.
  • Start date Start date
M

mika.

Hello, does anyone see a problem with the following code?
SelectInfo is defined as: Sub SelectInfo(ballotWkst As
Worksheet)...Thanks!!

Sub ImportOnBehalfOf()

Dim wkbknum, thisnum As Integer
Dim wkst As Worksheet
Dim wkbk As Workbook

For wkbknum = 1 To (Workbooks.Count - 1)
For Each wkst In Workbooks(wkbknum).Worksheets
If wkst.Name = "Ballot" Then
SelectInfo (wkst) '<--doesn't like this line
End If
Next

Next

End Sub
 
Waht happens if you either remove the parentheses or change it to use
the "Call" keyword. I'm assuming that the SelectInfo is either in the
same workbook or that there is a Refernce to the workbook that
contains it.

SelectInfo wkst

or

Call SelectInfo (wkst)

HTH
Paul
 
Back
Top