G
greg
Hi,
I have creeated a custom task form that populates a variable number of
fields from an excel sheet.
I have fields on the form labeled PO1; PO2; PO3; etc. and I use a counter
to identify the next field to populate. (seen below)
Do While cust1 = ActiveSheet.Cells(row1 + 6, 3) And prod1 =
ActiveSheet.Cells(row1 + 6, 6)
row1 = row1 + 6
counter = counter + 1
.UserProperties("PO Number" & counter).Value = ActiveSheet.Cells(row1, 2)
.UserProperties("QTY" & counter).Value = ActiveSheet.Cells(row1, 10)
MyItem.GetInspector.ModifiedFormPages("POs Affected").Controls("PO Number"
& counter).Visible = True
MyItem.GetInspector.ModifiedFormPages("POs Affected").Controls("QTY" &
counter).Visible = True
Loop
My fileds are named correctly; my row counting is correct; and the counter
works from PO1 to PO5. However, the macro hits an error on PO6 and stops.
Any ideas why it stops at 6?
THank you.
I have creeated a custom task form that populates a variable number of
fields from an excel sheet.
I have fields on the form labeled PO1; PO2; PO3; etc. and I use a counter
to identify the next field to populate. (seen below)
Do While cust1 = ActiveSheet.Cells(row1 + 6, 3) And prod1 =
ActiveSheet.Cells(row1 + 6, 6)
row1 = row1 + 6
counter = counter + 1
.UserProperties("PO Number" & counter).Value = ActiveSheet.Cells(row1, 2)
.UserProperties("QTY" & counter).Value = ActiveSheet.Cells(row1, 10)
MyItem.GetInspector.ModifiedFormPages("POs Affected").Controls("PO Number"
& counter).Visible = True
MyItem.GetInspector.ModifiedFormPages("POs Affected").Controls("QTY" &
counter).Visible = True
Loop
My fileds are named correctly; my row counting is correct; and the counter
works from PO1 to PO5. However, the macro hits an error on PO6 and stops.
Any ideas why it stops at 6?
THank you.