excel - Fix IsNumeric Loop Bug? -


i trying fix simple loop message box won't go away until user enters integer. here code:

sub platemicro()  strname = inputbox(prompt:="enter number of wells in plate. default 96 (8x12).", _       title:="plate setup", default:="96")  dim wellcount object dim numericcheck boolean numericcheck = isnumeric(wellcount)  if isnumeric(wellcount) range("a1").value = wellcount 'enter number of plate wells selected template. else: strname = inputbox(prompt:="you must enter integer. enter number of wells in plate. default 96 (8x12)." _       , title:="plate setup", default:=userdefaultchoice) end if end sub 

consider:

sub intcheck()    dim var variant    var = "whatever"    while not isnumeric(var)       var = application.inputbox(prompt:="enter integer", type:=2)    wend     msgbox "thanks!" end sub 

this allow exit if touch cancel


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -