LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default Msgbox if Inputbox entry contains character

Hello. I have an app.inputbox piece of code below. I would like prevent
users from using an underscore ( _ ) in the input box. How can I modify the
code below? Thank you!

userinput = Application.InputBox("User Input")
If userinput = False Then
Exit Sub
Else
***if userinput contains an underscore then
msgbox ("cannot use underscores") vbokonly, then bring
them back to the input box for re-entry
else
Run the rest of my code


 
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
Help with InputBox and MsgBox Preschool Mike Excel Discussion (Misc queries) 9 April 14th 10 06:23 PM
Help with InputBox and MsgBox Ann New Users to Excel 2 April 11th 07 03:46 PM
msgbox / inputbox etc samenvoegen van sheets Excel Discussion (Misc queries) 2 March 16th 06 08:56 AM
msgbox / inputbox etc samenvoegen van sheets Excel Worksheet Functions 2 March 15th 06 04:28 PM
Inputbox() Sum() MsgBox() Nigel Excel Programming 1 August 25th 04 06:20 PM


All times are GMT +1. The time now is 09:35 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"