Thread: Overflow Error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_103_] p45cal[_103_] is offline
external usenet poster
 
Posts: 1
Default Overflow Error


Next time it stops, go into debug mode and hover over *CurrentRow* in
the code. It should tell you its value. Then go to your sheet and to
that row and look in column F. Is the number there greater than 32,767
or less than -32,768? I bet you it is.
Change:
Dim OnHand As Integer
to:
Dim OnHand As Long

It might do to do that for ATS too.
Note that later in the code there's a variable called ATS1 which is
always empty; a typo?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=133687