Hi All...............Thank u in advance for any help
brfore writting the comming code every code were just fine and worked.....
the atached file (Sales Invoice+ Auto stock Reduction {Osama}) when i write the comming code to the file in a standard module, an error message appears when the private code in the sheet invoice Run, which says:
user-defined type not defined
this Msg appears only two or three times and then the Excel application shows another Msg when opening this specific workbook (Sales Invoice+ Auto stock Reduction {Osama}), the Ksg says:
Microsoft Excel has encountered a problem and need to close the workbook.
then a check box checked and infront of it written: Recover my work and restart Excel............
so i checked the box and press ok, so the Excel started again opened the mentioed WB, but without any private and standarad modules.....
The meant code: (which was placed in a standard module)
bear in mind that the code itself worked alone very well, only when combinrd with the the mentioned file.......the problem appears
Sub Auto_Open()
Worksheets("Stock").OnEntry = "Macro3"
End Sub
Sub Macro3()
DIM ReOrdValue as Integer, Mycheck as Integer
with activecell
if .column = 1 then
Application.InputBox("Set the Reorder Point ","",)
end if
end with
if ReOrdValue <= o then
exit sub
end if
Mycheck = Msg(ReOrdValue,vbYesNo, "Continue?")
if Mycheck = vbNo then
exit sub
end if
Activecell.Offset(0, 2) = ReOrdValue
End Sub
pls find the attached file .....to try it
yours
h