Vb Help

Posted on 2011-05-11
Medium Priority
Last Modified: 2012-05-11
Please can you help.

I want to be able to display the corresponding code in TextBox7 "Location Code"

Textbox 8 is K17:K28 "Datasheet" the corresponding codes are in L17:L28
Question by:Gazza83
LVL 77

Accepted Solution

GrahamSkan earned 2000 total points
ID: 35742370
Does this help?
Private Sub ListBox1_Change()
    TextBox8.Value = ListBox1.List(ListBox1.ListIndex)
    TextBox7.Value = Sheets("DataSheet").Cells(17 + ListBox1.ListIndex, 12).Value
End Sub

Open in new window


Author Closing Comment

ID: 35742409
Thanks for your help!

Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question