![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: London, Ontario, Canada
Posts: 45
|
Hi, I have a user form that displays text in Cell A2, I'd like to be able to continue down the line from A2 to A11 using my userform to get the data. Do I have to make 11 diffrent userforms or is there a better way? Thanks in advance, Sean |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 95
|
Quote:
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Location: London, Ontario, Canada
Posts: 45
|
Ooops, sorry, I'll try to explain better.
I have a userform with a combobox that holds a large list. When I select something I have it displayed in a cell (just happens to be A2) What I want is for the next time I choose something from my userform combo box is for it to pop up in the next cell down in column A. ( so the first time I enter something it goes to A2, second time it goes to A3 ect.) |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 14
|
Try this: Use the Change Procedure for your combo box and a do loop and an IsEmpty function
Example: Private Sub cboModule_Change() ActiveWorkbook.Sheets("Test").Activate Range("A2").Select Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True ActiveCell.Value = cboModule.Value Range("A2").Select End Sub This will check for an empty cell in the first column and if it's not empty it will write the selection to the next cell in that column. Hope that helps you |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|