ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA code using if then and msgbox (https://www.excelbanter.com/excel-discussion-misc-queries/58276-vba-code-using-if-then-msgbox.html)

snoopy

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



All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com