View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
snoopy
 
Posts: n/a
Default VBA code using if then and msgbox


I wanted to use a macro that does the following. Currently I have
created a userform inventory list. In the userform I entered the item
sold and the quantity sold. I wanted to somehow squeeze a macro in
this userform that would do the following. If for instance there is
one item remaining in inventory and I accidentally put 2 items were
sold, I want the macro to check my inventory list and have a msgbox pop
up saying something like "Items sold exceeds inventory remaining.
Please check inventory!"

However, I am not the best at userforms and I dont know if I can use an
If statement in a macro. Can someone please help?


--
snoopy
------------------------------------------------------------------------
snoopy's Profile: http://www.excelforum.com/member.php...o&userid=16840
View this thread: http://www.excelforum.com/showthread...hreadid=489957