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
Jim Thomlinson - 28 Sep 2006 21:23 GMT
Which line throws the error?

Signature
HTH...
Jim Thomlinson
> I have the following code:
>
[quoted text clipped - 15 lines]
> debug.print record.Address(external:=true) shows:
> [Junk.xls]Sheet1!$A$6:$K$6
Bob Phillips - 28 Sep 2006 22:31 GMT
Sub foo()
Dim record As Range
Set record = Range("A" & ActiveCell.Row & ":K" & ActiveCell.Row)
record.Select
upload record
End Sub

Signature
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
> I have the following code:
>
[quoted text clipped - 15 lines]
> debug.print record.Address(external:=true) shows:
> [Junk.xls]Sheet1!$A$6:$K$6
perldev@gmail.com - 29 Sep 2006 12:59 GMT
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.
> Sub foo()
> Dim record As Range
[quoted text clipped - 30 lines]
> > debug.print record.Address(external:=true) shows:
> > [Junk.xls]Sheet1!$A$6:$K$6
Dave Peterson - 29 Sep 2006 13:30 GMT
Bob's suggestion was to remove the () in:
Upload(record)
change this line to:
Upload record
You could also use:
Call Upload(record)
> The foo sub threw out the error.
>
[quoted text clipped - 43 lines]
> > > debug.print record.Address(external:=true) shows:
> > > [Junk.xls]Sheet1!$A$6:$K$6

Signature
Dave Peterson
perldev@gmail.com - 29 Sep 2006 14:37 GMT
This worked! Thank you Dave!
> Bob's suggestion was to remove the () in:
> Upload(record)
[quoted text clipped - 51 lines]
> > > > debug.print record.Address(external:=true) shows:
> > > > [Junk.xls]Sheet1!$A$6:$K$6
Dave Peterson - 29 Sep 2006 16:10 GMT
That was Bob's suggestion--but I'm sure he's happy you got it working.
> This worked! Thank you Dave!
>
[quoted text clipped - 57 lines]
> >
> > Dave Peterson

Signature
Dave Peterson