LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Excel VB User Form Using Vlookup?

Hello Fellow Programmers! I am having a difficult time trying to get my
user form to search through a spreadsheet and retrieve the information
using the Application.Vlookup code...I have searched numerous other
posts and haven't found one code that worked the way I needed it to.

Private Sub TextBox10_Change()
x = Application.VLookup(TextBox10.Value,
Worksheets("SYSDATA").Range("A2:J30"), 2, False)
TextBox1.Value = x

End Sub

The objective is I have a Record Number listed in TextBox10... I have
information setup in the spreadsheet that I would liked filled in
TextBoxes 1 - 9 based on the value of TextBox10. I have tried to use
the code above to work but it keeps giving me a error message saying
"Could not set the Value property. Type Mismatch"...So my question is
how can I have my 9 other text boxes use the Vlookup code (using the
value from Textbox10 as the search value, to retrieve the information
based on its value?) TextBox10 will always be a number (for now)...I
might need the code to lookup the value of a non-numerical string at
some point but I'll be happy with just having the vlookup code work.
Any help is greatly appreciated!!!

 
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
Excel User Form MG Excel Worksheet Functions 0 February 25th 09 12:58 AM
Minimize excel user form Hammer1947 Excel Programming 5 July 15th 06 06:29 AM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
How do I create a user form in excel? Carey Excel Programming 3 August 13th 04 01:26 PM


All times are GMT +1. The time now is 06:23 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"