VBA code using if then and msgbox

S

snoopy

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top