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

RE: Run-time error 424, Object required by James_Thomlinson

James_Thomlinson
Thu Sep 28 15:23:01 CDT 2006

Which line throws the error?
--
HTH...

Jim Thomlinson


"perldev@gmail.com" wrote:

> 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
>
>

Re: Run-time error 424, Object required by Bob

Bob
Thu Sep 28 16:31:01 CDT 2006

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
>



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
> >


Re: Run-time error 424, Object required by Dave

Dave
Fri Sep 29 07:30:57 CDT 2006

Bob's suggestion was to remove the () in:
Upload(record)
change this line to:
Upload record

You could also use:
Call Upload(record)




perldev@gmail.com wrote:
>
> 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
> > >

--

Dave Peterson

Re: Run-time error 424, Object required by perldev

perldev
Fri Sep 29 08:37:09 CDT 2006

This worked! Thank you Dave!

Dave Peterson wrote:
> Bob's suggestion was to remove the () in:
> Upload(record)
> change this line to:
> Upload record
>
> You could also use:
> Call Upload(record)
>
>
>
>
> perldev@gmail.com wrote:
> >
> > 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
> > > >
>
> --
>
> Dave Peterson


Re: Run-time error 424, Object required by Dave

Dave
Fri Sep 29 10:10:43 CDT 2006

That was Bob's suggestion--but I'm sure he's happy you got it working.

perldev@gmail.com wrote:
>
> This worked! Thank you Dave!
>
> Dave Peterson wrote:
> > Bob's suggestion was to remove the () in:
> > Upload(record)
> > change this line to:
> > Upload record
> >
> > You could also use:
> > Call Upload(record)
> >
> >
> >
> >
> > perldev@gmail.com wrote:
> > >
> > > 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
> > > > >
> >
> > --
> >
> > Dave Peterson

--

Dave Peterson