INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Trying to populate list box on another sheet getting runtime error 13 Type mismatch

Trying to populate list box on another sheet getting runtime error 13 Type mismatch

Trying to populate list box on another sheet getting runtime error 13 Type mismatch

(OP)
Hello,
I have two worksheets. One sheet has my list boxes on it and the other sheet has my data in it. I am trying to populate my second list box based on values that I clicked on from the first list box. I am getting a run time error 13 Type mismatch. Sheet 1 is called Input, second sheet is called PracticeNames. The name of my first listbox is lstWave, the name of my second listbox is lstPractices. My goal is to list all the text within a range depending on the input. I am starting with Range 1 that is defined as B2:B6


CODE --> VB

Private Sub lstPractices_Click()

Dim ws As Worksheet
Dim lRow As Long

Set ws = Worksheets("PracticeNames")

lRow = ws.Range("B" & Rows.Count).End(xlUp).Row

If lstWave.Value = 1 Then lstPractices.Value = Worksheets("PracticeNames").Range("B2:B6").Value 'Runtime Error 13 Type mismatch

End Sub 

RE: Trying to populate list box on another sheet getting runtime error 13 Type mismatch

Hi,

This code to load a range does not make sense. You don't use the Listbox_Click event to load list data. You could use the click event on some OTHER ListBox, for instance.

So this might work. Name your ranges on PracticeNamed, List1, List2...etc.

CODE

Private Sub lstWave_Click()
    lstPractices.ListFillRange = "List" & latWave.Value
End Sub 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Trying to populate list box on another sheet getting runtime error 13 Type mismatch

(OP)
Skip,
Thanks for the help. This fixed the issue. Have a great day!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close