dan_l
Active Member
Here's my code:
Sub createplst()
Dim cell As Range
Dim recordcount As Integer
Dim ticker As Integer
Dim reqmoves As Integer
Dim cellrow As Integer
recordcount = Sheets("otl").UsedRange.Rows.Count
ticker = 2
'dfe P List
Sheets("plst").UsedRange.Delete
'apply headers to P list
Sheets("plst").Range(Sheets("plst").Cells(1, 1), Sheets("plst").Cells(1, 16)).Value = Sheets("otl").Range(Sheets("otl").Cells(1, 1), Sheets("otl").Cells(1, 16)).Value
For Each cell In Sheets("otl").Range(Sheets("otl").Cells(2, 16), Sheets("otl").Cells(recordcount, 16))
If cell.Value = "P" Then
cellrow = cell.Row
//Sheets("plst").Range(Sheets("plst").Cells(ticker, 1), //Sheets("plst").Cells(ticker, 16)).Value = //Sheets("otl").Range(Sheets("otl").Cells(cellrow, 1), Sheets("otl").Cells(cellrow, //16)).Value
ticker = ticker + 1
End If
Next cell
What's happening:
Selected cells from one list are being moved to another list. The cells are being moved as a row. The problem: This is grab bag data that comes out of a database. One of the fields is a gigantic blob of text. One record in particular throws an error. the only discernible difference between that record and any other, is that the big text field has a ton of text in it.
Now, if I just say----pick that cell and go Range("Junkcell").value = Range("mytroublecell").value, it works fine.
Sub createplst()
Dim cell As Range
Dim recordcount As Integer
Dim ticker As Integer
Dim reqmoves As Integer
Dim cellrow As Integer
recordcount = Sheets("otl").UsedRange.Rows.Count
ticker = 2
'dfe P List
Sheets("plst").UsedRange.Delete
'apply headers to P list
Sheets("plst").Range(Sheets("plst").Cells(1, 1), Sheets("plst").Cells(1, 16)).Value = Sheets("otl").Range(Sheets("otl").Cells(1, 1), Sheets("otl").Cells(1, 16)).Value
For Each cell In Sheets("otl").Range(Sheets("otl").Cells(2, 16), Sheets("otl").Cells(recordcount, 16))
If cell.Value = "P" Then
cellrow = cell.Row
//Sheets("plst").Range(Sheets("plst").Cells(ticker, 1), //Sheets("plst").Cells(ticker, 16)).Value = //Sheets("otl").Range(Sheets("otl").Cells(cellrow, 1), Sheets("otl").Cells(cellrow, //16)).Value
ticker = ticker + 1
End If
Next cell
What's happening:
Selected cells from one list are being moved to another list. The cells are being moved as a row. The problem: This is grab bag data that comes out of a database. One of the fields is a gigantic blob of text. One record in particular throws an error. the only discernible difference between that record and any other, is that the big text field has a ton of text in it.
Now, if I just say----pick that cell and go Range("Junkcell").value = Range("mytroublecell").value, it works fine.