Hi everyone,
I have an on-going display problem in another thread("#######") and I thought of a way to solve this problem and eliminate all the headaches:
Looking at the code below, you'll notice that all the field headers are on the same row: example: Firstname Lastname Salary Comments
What if I split the record so that firstname, lastname Salary are written on the same line(row) and the comments is written on the next line(row) by itself and then I can merge the comment row with other cells so there's enough room for all the data to display?
This is how I want the records to display:
Firstname Lastname Salary
Jack John 5,000.00
Comments:
"This employee is over 50 years old and have put in 25 years in this organization"
etc.
Do you understand where I'm going with this?
What is the code I can use to accomplish the above format.
Below is the module that writes the records on the spreadsheet:
Thanks.Code:ii = 6 Do Until rsin.EOF = True ii = ii + 1 xlWksht.Cells(ii, 1).Value = rsin![Req No] xlWksht.Cells(ii, 2).Value = rsin![Description] xlWksht.Cells(ii, 3).Value = rsin![P L] & Chr(10) & rsin![Pgmr2] & Chr(10) & rsin![Pgmr3] xlWksht.Cells(ii, 4).Value = rsin![ClientName] & Chr(10) & rsin![Status] xlWksht.Cells(ii, 5).Value = "-" & Chr(10) & rsin![Per Hrs] xlWksht.Cells(ii, 6).Value = rsin![Hours] & Chr(10) & rsin![Tot Hrs] xlWksht.Cells(ii, 7).Value = rsin![Start Date] & Chr(10) & rsin![Start Date] xlWksht.Cells(ii, 8).Value = rsin![End Date] & Chr(10) & rsin![End Date] xlWksht.Cells(ii, 9).Value = "'" & rsin![Comments] rsin.MoveNext Loop
GiftX




Reply With Quote