Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks that seems like it will work
but now I am getting an "End If without Block If" Can I run a do loo inside of a for loop? heres my code 'Looking in the Sales Order Sheet For i = 1 To UBound(OrderNum) tempFlag = 0 If OrderNum(i) = purchase.Value Then 'Filter in Matching Order # tempFlag = 1 If ItemId(i) = "" Then 'Test for Empty cell tempFlag = 0 End If End If If tempFlag = 1 Then 'Filter out Empty cells For j = 1 To UBound(ItemList) If ItemList(j) = ItemId(i) Then Range("A2:A100")(j).Activate 'Write beginning value for sub assembly Me.Controls("txtSubQty" & Counter).Enabled False Me.Controls("txtQty" & Counter).Enabled = True Me.Controls("txtSubQty" & Counter).BackColor &H8000000F Me.Controls("txtQty" & Counter).Value = Qty(i) CellDesValue = ActiveCell.Offset(0, 0) Me.Controls("txtItem" & Counter).Value CellDesValue CellDesValue = ActiveCell.Offset(0, 1) Me.Controls("txtDes" & Counter).Value CellDesValue Counter = Counter + 1 Do CellQuanValue = ActiveCell.Offset(0 SubCounter) SubCounter = SubCounter + 1 Me.Controls("txtSubQty" & Counter).Enabled True Me.Controls("txtQty" & Counter).Enabled False Me.Controls("txtQty" & Counter).BackColor &H8000000F Me.Controls("txtSubQty" & Counter) CellQuanValue CellDesValue = ActiveCell.Offset(0 SubCounter) Me.Controls("txtDes" & Counter) = CellDesValue SubCounter = SubCounter + 1 Counter = Counter + 1 While Not IsEmpty(ActiveCell.Offset(0, Counter)) End If Next j Me.Controls("txtQty" & Counter).Value = Qty(i) Me.Controls("txtItem" & Counter).Value = ItemId(i) Me.Controls("txtDes" & Counter).Value = ItemDes(i) Me.Controls("txtSubQty" & Counter).Enabled = False Me.Controls("txtSubQty" & Counter).BackColor &H8000000F Counter = Counter + 1 End If Next -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
use time functions inside if loop | Excel Worksheet Functions | |||
offsetting Secondary Axes to a cell value | Charts and Charting in Excel | |||
Active cell blinks for no reason while running inside of Citrix XP | Excel Worksheet Functions | |||
Offsetting from the Reference of a Cell, not the cell | Excel Programming | |||
Preventing opening workbook inside active workbook. | Excel Programming |