Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 2 columns on a worksheet which include a list of default values. What
I want to do is allow people to add to the list - but I would like to do this in a user form for 2 reasons 1 - almost everything else they do is through user forms and 2 I want them to see only the columns that contain the information they need. Columns B and E. I could do this by protecting the shet and hiding all other columns - but would like to make it neater, by displaying the range of cells, or both columns on a user form. Is this possible? wAyne_ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK Tom,
what you suggest should add all of the existing default information to a list box on the userform -- OK, but I also want them to be able to add items, and preferably see the entire matrix. so, far the only option I can see is allow them to the sheet directly or create sets of text boxes for each possible entry, is there another way? "Tom Ogilvy" wrote: Maybe something like this: Private Sub Userform_Initialize() Dim rng as Range With worksheets("Data") set rng = .Range(.Cells(2,"B"),.Cells(rows.count,"B").end(xl up)) End with with me.ListBox1 .ListCount = 2 for each cell in rng .AddItem cell.Vaue .List(.listcount-1,1) = cell.offset(0,3).Value Next End With End Sub -- Regards, Tom Ogilvy "wAyne" wrote: I have 2 columns on a worksheet which include a list of default values. What I want to do is allow people to add to the list - but I would like to do this in a user form for 2 reasons 1 - almost everything else they do is through user forms and 2 I want them to see only the columns that contain the information they need. Columns B and E. I could do this by protecting the shet and hiding all other columns - but would like to make it neater, by displaying the range of cells, or both columns on a user form. Is this possible? wAyne_ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can you load part of a worksheet into a userform | Excel Programming | |||
LOAD userform | Excel Programming | |||
UserForm label doesn't load? | Excel Programming | |||
new error when try to load userform | Excel Programming | |||
Load a Userform | Excel Programming |