LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Multi-column ListBox. Multiple bound columns???

Hello everyone,

I have a very large data table that stores project information (20+) columns wide and dynamic in length. I have built a user form, for editing purposes, to pull data from certain cells based on the project number entered. I have adapted code from this forum (I believe from Tom Oligvy), that pulls the data quite well. The project number can appear multiple times and most of the data is constant, within the project, except for 5 columns that contain staff members and hours assigned. In the above mentioned code (shown below) I create an array to hold the variables from the 5 columns. I have tested the code by writing the values to a blank sheet to check for data integrity. Now is my dilemma.....

I am trying to figure out the best way to present these variables to the user for editing. There can be 1 to 10 staff members present on a given project. My first thought is to send them to a list box for the user to edit. I don't know how to code this and then write the data back to the original cells.

Any thoughts??

Thanks, Joe

Private Sub ProjNumEditButton_Click()
Dim stfary(10, 5)

Me.ProjNumEditTextBox.BackColor = RGB(153, 153, 153)
Me.ProjNumEditTextBox.Locked = True

i = 1

With Worksheets("Source Data")
For Each Cell In .Range("e2:e500")
If Cell.Text = ProjNumEditTextBox.Value Then
ProjectStatusTextBox.Value = .Cells(Cell.Row, 1).Value
ProjectNameTextBox.Value = .Cells(Cell.Row, 4).Value
ProjNumTextBox.Value = .Cells(Cell.Row, 5).Value
BudgetRemTextBox.Value = .Cells(Cell.Row, 7).Value
ABTextBox.Value = .Cells(Cell.Row, 8).Value
TMTextBox.Value = .Cells(Cell.Row, 9).Value
PMTextBox.Value = .Cells(Cell.Row, 10).Value
stfary(i, 1) = .Cells(Cell.Row, 11).Value
stfary(i, 2) = .Cells(Cell.Row, 12).Value
stfary(i, 3) = .Cells(Cell.Row, 13).Value
stfary(i, 4) = .Cells(Cell.Row, 14).Value
stfary(i, 5) = .Cells(Cell.Row, 15).Value
i = i + 1
End If
Next
End With
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple columns / rows to be referenced through a listbox Hru48 Excel Discussion (Misc queries) 0 July 4th 05 04:12 PM
Bound column does not work after hiding form TerryK[_2_] Excel Programming 5 December 10th 03 03:21 AM
Transfer multiple columns items form listbox to range Rolo[_3_] Excel Programming 3 November 15th 03 06:50 PM
Multi-columns in a ListBox Tom Atkisson Excel Programming 1 October 5th 03 10:27 PM
Date formatting in a multi column listbox Nigel Brown[_2_] Excel Programming 2 September 3rd 03 11:29 AM


All times are GMT +1. The time now is 09:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"