G
Guest
I am using Excel 2003 and VB for Applications to write a program to keep
track of our orders and inventory
no major problems until now....
i have a decent ammount of debugging experience so tracking down problems is
not too hard (usually....)
I have the following code in a sub, and it is the ONLY code in this
particular sub
<BEGIN VB CODE>
private sub DoesWOExist()
' msgbox("got to a")
Sheets("customer orders").Select
' msgbox("got to b")
Range("d9").Select
' msgbox("got to c")
Do While ActiveCell.Value <> ""
' msgbox(got to d")
If ActiveCell.Value = workOrderNumber Then
woExist = True
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
end sub
<END VB CODE>
i have tried breakpoints and stepping and also the (commented) msgbox to try
and figure out WHAT is causing the error.
when the code is run, (and the msgbox lines are un-commented) i DO get the
following:
got to a
got to b
then I get Microsoft Visual Basic popup window with a Red X and the message
"400". (wthout quotes), and an OK and HELP button. Nothing else. The HELP
button brings up an empty help window.
Range("d9") is empty (this error occurs even with something in that box - or
even with data in D10, D11, D12, etc)
I have looked for help on this error and haven't found anything yet.
My questions are
a) What is the '400' error
and more importantly
b) Why is it giving me that error? - I have used this same code before and
it worked.
Thanks in advance.
track of our orders and inventory
no major problems until now....
i have a decent ammount of debugging experience so tracking down problems is
not too hard (usually....)
I have the following code in a sub, and it is the ONLY code in this
particular sub
<BEGIN VB CODE>
private sub DoesWOExist()
' msgbox("got to a")
Sheets("customer orders").Select
' msgbox("got to b")
Range("d9").Select
' msgbox("got to c")
Do While ActiveCell.Value <> ""
' msgbox(got to d")
If ActiveCell.Value = workOrderNumber Then
woExist = True
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
end sub
<END VB CODE>
i have tried breakpoints and stepping and also the (commented) msgbox to try
and figure out WHAT is causing the error.
when the code is run, (and the msgbox lines are un-commented) i DO get the
following:
got to a
got to b
then I get Microsoft Visual Basic popup window with a Red X and the message
"400". (wthout quotes), and an OK and HELP button. Nothing else. The HELP
button brings up an empty help window.
Range("d9") is empty (this error occurs even with something in that box - or
even with data in D10, D11, D12, etc)
I have looked for help on this error and haven't found anything yet.
My questions are
a) What is the '400' error
and more importantly
b) Why is it giving me that error? - I have used this same code before and
it worked.
Thanks in advance.