LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default INDEX/MATCH formula in VBA to populate text boxes


Well, there you go. I just realized what you meant about the single
quotes. I put them in and it works like a dream! Thanks again Tom, you
are a life saver as usual!

Tom Ogilvy Wrote:
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"

wrote in message
news:Amber_D_Laws.23c7om_1140118802.9768@excelforu m-nospam.com...

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



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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
index / lookup / match / text formula JB2010 Excel Discussion (Misc queries) 4 March 28th 07 03:01 AM
index / lookup / match / text formula Toppers Excel Discussion (Misc queries) 3 March 28th 07 01:13 AM
index / lookup / match / text formula Toppers Excel Discussion (Misc queries) 0 March 28th 07 12:20 AM
index / lookup / match / text formula JB2010 Excel Discussion (Misc queries) 0 March 28th 07 12:18 AM
Keep text color from a Index Match Formula Woody Excel Programming 4 July 21st 05 05:43 PM


All times are GMT +1. The time now is 04:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"