Re: Run-time error 424, Object required by perldev
perldev
Fri Sep 29 06:59:04 CDT 2006
The foo sub threw out the error.
Sub foo()
..
On Error GoTo ErrorHandle
Upload(record)
exit sub
ErrorHandle:
Msgbox "Something wrong with range", vbCritical
End Sub
It hit the msgbox.
Bob Phillips wrote:
> Sub foo()
> Dim record As Range
> Set record = Range("A" & ActiveCell.Row & ":K" & ActiveCell.Row)
>
> record.Select
> upload record
> End Sub
>
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> <perldev@gmail.com> wrote in message
> news:1159474543.652078.184800@m73g2000cwd.googlegroups.com...
> > I have the following code:
> >
> > sub foo()
> > dim record as range
> > set record = Range("A" & ActiveCell.row & ":K" & ActiveCell.row)
> >
> > record.select
> > Upload(record)
> > end sub
> >
> > public sub Upload(ByRef r as Range)
> > ....
> > end sub
> >
> > It keeps throwing out error: "run-time error 424, Object required",
> > what's wrong?
> >
> > debug.print record.Address(external:=true) shows:
> > [Junk.xls]Sheet1!$A$6:$K$6
> >