Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default InputBoxes Exceptions

How do I make an error report appear if characters are entered into a
input box rather than numbers and vicer versa

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default InputBoxes Exceptions

num = Application.Inputbox("Enter Numbers:", type:=1)

A number can be text, so not sure what you mean about the vicer versa.

--
Regards,
Tom Ogilvy


"ianripping " wrote in message
...
How do I make an error report appear if characters are entered into an
input box rather than numbers and vicer versa?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default InputBoxes Exceptions

This is perfect, can it be done so that if i ask for a letter and
number is inputted, a simillar error will appear

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default InputBoxes Exceptions

As I said, a number can be part of a string, so you can't do it with built
in functionality. You can have something like:

Sub AAAATester1()
Do
res = Application.InputBox("enter string", Type:=2)
If IsNumeric(res) Then MsgBox "no numbers"
Loop While Not IsNumeric(res)
End Sub

--
Regards,
Tom Ogilvy

"ianripping " wrote in message
...
This is perfect, can it be done so that if i ask for a letter and a
number is inputted, a simillar error will appear?


---
Message posted from http://www.ExcelForum.com/



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
Check if Duplicate with Exceptions mjones Excel Worksheet Functions 6 January 18th 10 12:37 PM
sequential numbering exceptions Helen Excel Worksheet Functions 2 November 5th 09 05:27 PM
Positioning Userforms, InputBoxes Pflugs Excel Discussion (Misc queries) 1 July 10th 07 06:12 PM
exceptions in filtering jamie Excel Worksheet Functions 7 June 1st 06 10:38 PM
Exceptions to Validation Rules Jim Johnson Excel Worksheet Functions 5 November 7th 04 01:04 PM


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