freezefiz
Board Regular
- Joined
- May 21, 2008
- Messages
- 101
Hey everyone..
how do you terminate the esle-statement after the msgbox has appeared??
Apparently the msgbox appeared multiple times.
If you need the sample of the data table pls let me know.
Thanks Thanks.
how do you terminate the esle-statement after the msgbox has appeared??
Apparently the msgbox appeared multiple times.
If you need the sample of the data table pls let me know.
Thanks Thanks.
Code:
If CStr(Worksheets("db").Cells(intRow, 1).Value) = Sheets("GrandTotal").Range("b1").Value Then 'if date value match...
proID = Worksheets("db").Cells(intRow, 6).Value
pro = Worksheets("db").Cells(intRow, 7).Value
uom = Worksheets("db").Cells(intRow, 9).Value
qty = Worksheets("db").Cells(intRow, 8).Value
qty = "=SUMPRODUCT(--(db!R2C1:R[" & nDb & "]C1=R1C2),--(db!R2C6:R[" & nDb & "]C6=RC1),--(db!R2C7:R[" & nDb & "]C7=RC2),--(db!R2C9:R[" & nDb & "]C9=RC3),db!R2C8:R[" & nDb & "]C8)"
'Date' 'prodID' 'prod' 'uom' 'qty'
Range("b2").Formula = "=IF(ISNUMBER(B1),TEXT(WEEKDAY(B1),""dddd""),""Day?"")"
Set rProd = Sheets("GrandTotal").Range("a" & Columns.count).End(xlUp)
rProd.Offset(1, 0).Resize(, 2) = Array(proID, pro)
Set rUOM = Sheets("GrandTotal").Range("c" & Columns.count).End(xlUp)
rUOM.Offset(1, 0).Resize(, 2) = Array(uom, qty)
Else
MsgBox "no such date!", vbExclamation, "No orders"
---------->[B][COLOR=red]TERMINATE HERE[/COLOR][/B]
End If