Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help taking values from List box to spreadsheet
I am selecting values and putting them in a list box. I need to click a
button and have those vaues sent to a worksheet page, in A2 and down. I am totally lost on this one. Please help... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help taking values from List box to spreadsheet
Worksheets("Sheet1").Range("A2").End(xlDown).Value = Listbox1.Value
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "trward79" wrote in message ... I am selecting values and putting them in a list box. I need to click a button and have those vaues sent to a worksheet page, in A2 and down. I am totally lost on this one. Please help... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help taking values from List box to spreadsheet
I tried this, it does not take anything unless I select the value manualy.
Then it does that value only, and no others. "Bob Phillips" wrote: Worksheets("Sheet1").Range("A2").End(xlDown).Value = Listbox1.Value -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "trward79" wrote in message ... I am selecting values and putting them in a list box. I need to click a button and have those vaues sent to a worksheet page, in A2 and down. I am totally lost on this one. Please help... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help taking values from List box to spreadsheet
Private Sub CommandButton1_Click()
Dim v as Variant v = UserForm1.ListBox1.List With Worksheets("Sheet4").Range("A2") .Resize(UBound(v) - LBound(v) + 1, 1).Value = v End With End Sub worked for me. -- Regards, Tom Ogilvy "trward79" wrote in message ... I am selecting values and putting them in a list box. I need to click a button and have those vaues sent to a worksheet page, in A2 and down. I am totally lost on this one. Please help... |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help taking values from List box to spreadsheet
Where is the listbox?
Is it on a userform? Is it on a worksheet? If it's on a worksheet, is the listbox from the Forms toolbar or from the control toolbox toolbar? I'm gonna guess it's on a worksheet and from the control toolbox toolbar--with a button from the control toolbox that does the work. Option Explicit Private Sub CommandButton1_Click() Dim iCtr As Long Dim DestCell As Range Set DestCell = Me.Range("a2") With Me.ListBox1 DestCell.Resize(.ListCount).ClearContents For iCtr = 0 To .ListCount - 1 If .Selected(iCtr) Then DestCell.Value = .List(iCtr) Set DestCell = DestCell.Offset(1, 0) End If Next iCtr End With End Sub trward79 wrote: I tried this, it does not take anything unless I select the value manualy. Then it does that value only, and no others. "Bob Phillips" wrote: Worksheets("Sheet1").Range("A2").End(xlDown).Value = Listbox1.Value -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "trward79" wrote in message ... I am selecting values and putting them in a list box. I need to click a button and have those vaues sent to a worksheet page, in A2 and down. I am totally lost on this one. Please help... -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Taking a list | Excel Discussion (Misc queries) | |||
taking conditions from one spreadsheet to another | Excel Worksheet Functions | |||
taking a long list of duplicates... | Excel Discussion (Misc queries) | |||
Taking values from another cell | Excel Discussion (Misc queries) | |||
taking out lowest 2 values | Excel Worksheet Functions |