![]() |
inputbox help
i have an inputbox on one of my worksheets. on another worksheet i hav a listof about 40 numbers. i want to be able to cancel the inputbox an it exits on when i hit the cancel button. when i enter an incorrec number i want to the box to have another box pop up that says incorrec id. my code so far is Sub boxes() 'sub for user input boxes Range("f8").Offset(Range("checkoutindex"), 0) = Range("checkoutindex") Range("g8").Offset(Range("checkoutindex"), 0) = InputBox("Enter Produc ID #") Range("a2") = Range("g8").Offset(Range("checkoutindex")) Range("i8").Offset(Range("checkoutindex"), 0) = InputBox("Ente Quantity") End Sub Private Sub CommandButton1_Click() 'add item button Range("checkoutindex") = Range("checkoutindex") + 1 boxes Do While Range("a4") = True MsgBox ("Incorrect ID #") boxes Loop End Sub thank yo -- kcka ----------------------------------------------------------------------- kckar's Profile: http://www.excelforum.com/member.php...fo&userid=2532 View this thread: http://www.excelforum.com/showthread.php?threadid=53443 |
All times are GMT +1. The time now is 08:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com