Iterating the combo box and displaying the value after each change on seprate sheet.

February 02nd, 2012 - 05:49 am ET by sandeep sharma | Report spam
Here i have a combo box form control, from where i will be picking the value and displaying it on other sheet. Now i am updating the sheet with combo box control, value is getting pasted on Consolidated-Report using:
Worksheets("Consolidated-Report").Range("a9").Value = Me.ComboBox2.Value
If now i again go back to combobox sheet and change the value, same cell is getting updated. I need to move to next row for each time the value is updated in combo box and paste the same on Consolidated-Report sheet.
email Follow the discussionReplies 2 repliesReplies Make a reply

Replies

#1 Jim Cone
February 03rd, 2012 - 02:31 pm ET | Report spam
Note: A Combobox from the Control Toolbox has the name ComboBoxN;
a Combobox from the Forms Toolbar has the name Drop Down N.
'
Private Sub ComboBox1_Change()
Dim LastRow As Long
With Worksheets("Consolidated-Report")
LastRow = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
If LastRow < 9 Then LastRow = 9
.Cells(LastRow, 1).Value = Me.ComboBox2.Value
End With
End Sub
'
Jim Cone
Portland, Oregon USA .
http://www.mediafire.com/PrimitiveSoftware .
(XL Companion add-in: compares, matches, counts, lists, finds, deletes...)




"sandeep sharma"
wrote in message
news:
Here i have a combo box form control, from where i will be picking the value and displaying it on
other sheet. Now i am updating the sheet with combo box control, value is getting pasted on
Consolidated-Report using:
Worksheets("Consolidated-Report").Range("a9").Value = Me.ComboBox2.Value
If now i again go back to combobox sheet and change the value, same cell is getting updated. I
need to move to next row for each time the value is updated in combo box and paste the same on
Consolidated-Report sheet.


Similar topics