Moemennada
New Member
- Joined
- Mar 7, 2013
- Messages
- 3
I am facing kind of a unique problem
i made a work book that is supposed to calculate packaging requirements for a production plant
the macros on it was working fine until one day it started to stop working over an " over flow Error " due to failure in referencing cells with the required values
for example : i have this condition
' here is supposed to be the if condition to calculate the Requirements for the Packaging
sometimes i find the VBA recognizing the value of variable "cans" as "zero" and sometimes i find it as the required value
without any significant change on my part
i made a work book that is supposed to calculate packaging requirements for a production plant
the macros on it was working fine until one day it started to stop working over an " over flow Error " due to failure in referencing cells with the required values
for example : i have this condition
' here is supposed to be the if condition to calculate the Requirements for the Packaging
Code:
If Worksheets("Order Form").Cells(Row1, 6) = "Cartons" Then
Cans = Worksheets("Order Form").Cells(Row1, 5) * Worksheets("Packaging Materials").Cells(Row2, 4)
Else: Cans = Worksheets("Order Form").Cells(Row1, 5)
End If
sometimes i find the VBA recognizing the value of variable "cans" as "zero" and sometimes i find it as the required value
without any significant change on my part