Microsoft Excel - Type Mismatch Error While using Inputbox

Asked By Rajender Prasad on 18-Jun-13 01:13 PM

Dear All,

I am getting type mismatch when I am using below line in the vba code.


inputvalue = Application.InputBox("Enter the Source: " & vbNewLine & vbNewLine & "1- Retriggered claims to feed in claims system" & vbNewLine & "2- Reconciliation report cleanup between cosmos and GPS" & vbNewLine & "3- Removed invalid character from address" & vbNewLine & "4- Removed invalid space from address" & vbNewLine & "5- Removed invalid character from last name" & vbNewLine & "6- Updated County as per USPS" & vbNewLine & "7- Added address with the correction of city" & vbNewLine & "8- Removed invalid character from address as per the COSMOS Error Reports" & vbNewLine & "9- Removed invalid space from address as per Cosmos Error Reports" & vbNewLine & "10- Added address with the correction of city as per Cosmos Error Reports" & vbNewLine & "11- Updated gender as per sms form unknown to male/female" & vbNewLine & "12- Added the address to fit the maximum 30-character length" & vbNewLine & "13- Updated the written language from Korean to English in GPS", "Select Source").

Please help

Prasad

Harry Boughen replied to Rajender Prasad on 18-Jun-13 05:11 PM
Hello Prasad,
I think it might be that your prompt string is too long.  There is probably a limit of 256 characters or something.  If you shorten the prompt you might find that it will work.
Regards
Harry
Harry Boughen replied to Rajender Prasad on 18-Jun-13 09:40 PM
Hello Prasad,
Further to my earlier comment, even if you do reduce the size of the prompt text, the input box size is fixed and the text would not show in its entirety.
I think your best bet is to use a UserForm to list the options and set the value depending on the user selection.
Regards
Harry