Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cancel on INPUTBOX macro causes error Barb Reinhardt Excel Programming 7 January 21st 06 11:28 PM
Type Mismatch Error when using InputBox Method Anolan Excel Programming 1 November 22nd 05 07:35 PM
Inputbox error? 10 divided by 100 equals 0.100000001490116 ??? staying[_4_] Excel Programming 1 July 9th 05 09:05 AM
Error 424 with inputbox method after OK Herman[_4_] Excel Programming 1 September 14th 04 11:12 PM
inputbox msgbox error lost again Excel Programming 3 April 14th 04 07:56 PM


All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"