excel vba - limit to output from Application.Inputbox -


i have user input box part of excel vba macro. need user able type 11 digit number this, input cell. however, greater 10 digit number returns value of 0. how round this?

my code is:

dim lnum long  on error resume next      application.displayalerts = false          lnum = application.inputbox _          (prompt:="enter starting number", _                 title:="starting number", type:=1)    application.displayalerts = true  range("b1").value = lnum 

for 11 digit number use double:

sub dural()     dim lnum double     lnum = application.inputbox(prompt:="enter starting number", title:="starting number", type:=1)     range("b1").value = lnum end sub 

for example:

enter image description here

results in:

enter image description here


Comments