-->>Hi,I have developed a Program that accepts the inputs from an Input Box of Interger datatype,but whenever I try to Cancel the Input Box (That means if I decided not to provide any value and Cancel it) I get an Error saying "Type Mismatch" My Variable assigned to It's declared: Dim LQ_Value As Integer and the line that generates an erro is:LQ_Value = InputBox("Plaese Enter The Number of LQ Forms Entered:", "Number of LQ Required.", "Example: 25", 7500, 4000).
-->>So I was wondering if I can have a way to omit this error by validating it...
Jump to Post
First off inputbox returns a string and your trying to put it into an integer, which might work if the string represents an integer. When it doesn't you get a mismatch. Changing LQ_Value to a string then converting its value to an integer later would work. A simple conditional statment …
All 7 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.