View Full Version : Inputbox format
Dear Experts
I want inputbox to accept only digits and maximum number of digits should not increase by 5 as 12345
please help
mikerickson
07-30-2007, 06:18 PM
This will validate the data as you want.
Dim userInput As Variant
Do
userInput = Application.InputBox("Enter a number < 10^6", Type:=1)
If userInput = False Then MsgBox "cancel pressed": Exit Sub
If 5 < Len(CStr(userInput)) Then MsgBox "Entry too long"
Loop Until Len(CStr(userInput)) < 6
MsgBox userInput & " is a good input."
Is it possible to show some icon or picture with inputbox?
No - if you need that you should look at creating a simple userform.
Regards,
Rory
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.