Is there anyone that can help...!!!!????

Frankie needs HELP

New Member
Joined
Apr 3, 2002
Messages
43
I've produced a userform with a drop-down list with items such as chair, table, bed etc. When i select one of them (eg. chair) , and press the command button to select the item, it flashes up with all of them and goes back to the original chosen one.

HELP! Whats going on?!

How do i get them to show up on the spreadsheet individually??!!!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Do you have any code on the userform pertaining to the list? I'm guessing that you may have something in the listbox "change" event that resets the selection.
 
Upvote 0
At the moment all ive got is a userform with a drop down list which has got all my item headings within it.

Im now trying to produce a command button that when you select from the drop down list the item and press the command butoon it takes you to that item in the spreadsheet. This isnt working at the moment!
 
Upvote 0
Put this code on your userform:

<pre>
Private Sub ListBox1_Click()
Dim oRange As Range
Set oRange = ActiveSheet.UsedRange.Find(what:=Me.ListBox1.Text)
oRange.Activate
End Sub</pre>

Change "ListBox1" to whatever the name of your listbox is. I've assumed that the active worksheet will house the data that is in the listbox.

HTH
 
Upvote 0
I may have picked up your post wrong. That previous code was for a "Listbox", I think that you may have a "ComboBox" (dropdown list).

Use this code if you have a combobox (put it on the userform):

<pre>
Private Sub ComboBox1_Change()
Dim oRange As Range
Set oRange = ActiveSheet.UsedRange.Find(what:=Me.ComboBox1.Text)
oRange.Activate
End Sub</pre>

Change "ComboBox1" to whatever the name of your combobox is.
 
Upvote 0
IMO I think Frankie needs to call 1-888-SOLPROV. They should have an answer for him/her.
 
Upvote 0
also; where do i put this code.

Ive got a 'private Sub ComboBox1_Change ()'

ive also got another heading; Command button which is

'private Sub CommandButton1_Click ()'
 
Upvote 0
On 2002-05-01 11:13, Frankie needs HELP wrote:
also; where do i put this code.

Ive got a 'private Sub ComboBox1_Change ()'

ive also got another heading; Command button which is

'private Sub CommandButton1_Click ()'

Highlight all of your code and copy and paste my code to replace it. (assuming that the lines of code you've quoted are the only lines you have there, apart from the associated "End Sub"'s)
 
Upvote 0
On 2002-05-01 11:02, Frankie needs HELP wrote:
Whats oRange ??

"oRange" is a variable that I've declared that will hold the address of the cell that contains the combobox value.

To be honest, it sounds like you're going to need to get an Excel VBA book to get you started. Have a look at some of MrExcel's recommendations:

http://www.mrexcel.com/book.shtml
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,217
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top