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

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
 
P

pfsardella

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top