|
-
Apr 14th, 2006, 01:33 PM
#1
Thread Starter
Lively Member
Append names until rowheight=X, then move to next column
Ok, I have a macro that appends names into cells on a grid, then it autofits then, problem is that once the row height getss over 390, it crashes. So, what i want to do is make every column in the grid actually contain TWO columns. Then, with a little formatting and bordering, it will look like it is only one column. I need help filling in this gap in the code. By the way, an autofit is run every time it loops, so the rowheight would be updated every time.
VB Code:
'Determine which cell in the grid the employee belongs to
With rngGrid.Cells(1 + lResCounter, 1 + lCapCounter)
'If the row height is greater than 350, then move to the next column over(but stay in the same row)
' This is where I need help, I don;t know what to put here
'Otherwise, just run the normal append code on that cell
Else
'If this is the first employee being added
'don't insert a comma before the name...
If .Value = "" Then
.Value = saEmployee(1, lRecordNum)
Else
'... otherwise append the employee to the
'list
.Value = .Value & Chr(10) & saEmployee(1, lRecordNum)
End If
End With
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|