Private Sub ComboBox1_Click()
Dim res As Variant
res = Application.Index(Range("'Catalog Listings'!$B$3:$D$223"), _
Application.Match(ComboBox1.Value, Range( _
"'Catalog Listings'!$B$3:$B$223"), 0), 2)
TextBox1.Value = res
End Sub
worked fine for me. (guess you need the single quotes for the range
argument)
--
Regards,
Tom Ogilvy
"Amber_D_Laws" <
[email protected]>
wrote in message
news:
[email protected]...
>
> I tried defining as:
>
> Dim res As String
> and
> Dim res As Variant
>
> both return the following error:
>
> "Run-time error '1004':
> Method 'Range' of object '_Global' failed
>
> I'm I doing something wrong, or does the code contain a typo?
>
> Amber
>
> Amber_D_Laws Wrote:
> > Great! However, I need to how to define the varible "res"
>
>
> --
> Amber_D_Laws
> ------------------------------------------------------------------------
> Amber_D_Laws's Profile:
http://www.excelforum.com/member.php...o&userid=30012
> View this thread: http://www.excelforum.com/showthread...hreadid=513312
>
Bookmarks