Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox (error if close)
I am trying to put an input box in that wont let you just push cancel, somethign MUST be input. Right now when they push cancle it just has an error in the program, but this needs to be a little more user friendly. Can i do this by having a message box pop up saying you must enter something then close that and have the inputbox still be up, or have a new input box come up that says you must enter a value and have it loop until a value is input. I have no idea how to do this though, please help. -- CatherineN ------------------------------------------------------------------------ CatherineN's Profile: http://www.excelforum.com/member.php...o&userid=35469 View this thread: http://www.excelforum.com/showthread...hreadid=560737 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox (error if close)
Do
str1 = Application.InputBox("Testing","Blah Blah") While str1 = False HTH Die_Another_Day "CatherineN" wrote in message ... I am trying to put an input box in that wont let you just push cancel, somethign MUST be input. Right now when they push cancle it just has an error in the program, but this needs to be a little more user friendly. Can i do this by having a message box pop up saying you must enter something then close that and have the inputbox still be up, or have a new input box come up that says you must enter a value and have it loop until a value is input. I have no idea how to do this though, please help. -- CatherineN ------------------------------------------------------------------------ CatherineN's Profile: http://www.excelforum.com/member.php...o&userid=35469 View this thread: http://www.excelforum.com/showthread...hreadid=560737 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox (error if close)
"Do...While" isn't VBA. Use: do while str1 = false str1 = Application.InputBox("Testing", "Blah Blah") loop Col -- colofnature ------------------------------------------------------------------------ colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356 View this thread: http://www.excelforum.com/showthread...hreadid=560737 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox (error if close)
If msgbox("Your Text") = VbCancel then
msgbox("You must enter some data"),VbOkOnly else end if -- Best wishes, Jim "CatherineN" wrote: I am trying to put an input box in that wont let you just push cancel, somethign MUST be input. Right now when they push cancle it just has an error in the program, but this needs to be a little more user friendly. Can i do this by having a message box pop up saying you must enter something then close that and have the inputbox still be up, or have a new input box come up that says you must enter a value and have it loop until a value is input. I have no idea how to do this though, please help. -- CatherineN ------------------------------------------------------------------------ CatherineN's Profile: http://www.excelforum.com/member.php...o&userid=35469 View this thread: http://www.excelforum.com/showthread...hreadid=560737 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox (error if close)
Thank you I got it to work, the logic makes sense, like any other programming language, but the syntax really still confuses me, so thanks for the help -- CatherineN ------------------------------------------------------------------------ CatherineN's Profile: http://www.excelforum.com/member.php...o&userid=35469 View this thread: http://www.excelforum.com/showthread...hreadid=560737 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox (error if close)
Sry... I just winged it without testing the code. The proper syntax is:
Do str1 = Application.InputBox("Testing","Blah Blah") Loop While str1 = False Die_Another_Day "colofnature" wrote in message ... "Do...While" isn't VBA. Use: do while str1 = false str1 = Application.InputBox("Testing", "Blah Blah") loop Col -- colofnature ------------------------------------------------------------------------ colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356 View this thread: http://www.excelforum.com/showthread...hreadid=560737 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cancel on INPUTBOX macro causes error | Excel Programming | |||
Type Mismatch Error when using InputBox Method | Excel Programming | |||
Inputbox error? 10 divided by 100 equals 0.100000001490116 ??? | Excel Programming | |||
Error 424 with inputbox method after OK | Excel Programming | |||
inputbox msgbox error | Excel Programming |