open userform and select listbox item

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,216
Office Version
  1. 2016
Hi guys,
again I need some help please...

Code:
Sub CopyWithoutProject()
    Dim lrow As Integer
    
    Tabelle7.Activate

    lrow = Cells(27, 8).End(xlUp).Row
    
    Cells(lrow, 8).Copy Destination:=Cells(lrow + 1, 7)
    Cells(lrow, 2).Copy Destination:=Cells(lrow + 1, 2)
    
    Cells(lrow + 1, 3) = [B]"Can I open a userform here and select an Item?"[/B]
    Application.CutCopyMode = False

End Sub

In the above code I like as writen open a userform or just a listbox and select a item from it.
Is something like this possible??

This is due to provide the user only with a list of items.

It would be nice if someone might have a hint for me.

Thanks again for your input!

Albert
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi Albert

See if this helps:


  • Set up a data validation list at cell H55
  • Run the expander code. It will show the full list, and after a value is selected, it’s transferred to another sheet.

Code:
' standard module
Sub Expander()


Sheets("Sheet1").Range("h55").Activate  ' where the list is
MsgBox "Select an item:"
Application.SendKeys ("%{down}")        ' expand dropdown
 
End Sub

' sheet module
Private Sub Worksheet_Change(ByVal Target As Range)


If Target = Me.Range("h55") Then _
Me.Range("h55").Copy Sheets("Sheet2").Range("f45")


End Sub
 
Upvote 0
Hi Worf,

sorry for the late reply was a bit busy.Unfortunatelly I need to get some other things sorted first but it looks good and I hope I be able to find time to test it all out!


Many thanks

Albert
 
Upvote 0

Forum statistics

Threads
1,214,574
Messages
6,120,329
Members
448,956
Latest member
Adamsxl

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