dim mStr as string 
mStr=inputbox("请输入数据")
if mStr="" then 
   msgbox "按了取消"
end if

解决方案 »

  1.   

    Inputbox的“取消按钮”无法取消,到当点击这个按钮的时候Inputbox会回返一个“Falsh”的值,你可以在此进行判断!
      

  2.   

    up error
    see downdim mStr as string mStr=inputbox("请输入数据")
    if mStr="" then 
       msgbox "按了取消"
    end if
      

  3.   

    请参考:
    http://www.csdn.net/expert/topic/620/620688.xml?temp=.1364405
      

  4.   

    dim mStr as string mStr=inputbox("请输入数据")
    if StrPtr(mStr)=0 then 
       msgbox "按了取消"
    end if