ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Application.inputbox °ÝÃD---[¤w¸Ñ¨M]

[µo°Ý] Application.inputbox °ÝÃD---[¤w¸Ñ¨M]

¥»©«³Ì«á¥Ñ swatt ©ó 2011-9-7 14:21 ½s¿è

½Ð±Ð¦U¦ì°ª¤â¤j¤j:
±q»¡©úÀɮפ¤½Æ»sApllication.inputbox½d¨Ò¦p¤U:
inputbox·|¦³¨â­Ó«ö¶s"½T©w"»P"¨ú®ø"¡A­Y«ö¤U"¨ú®ø"«h·|¶Ç¦^False
©Ò¥H¦Û¤v¦b«á­±¥[¤W¤@§PÂ_¦¡¡A­n§PÂ_­Y«ö¤U"¨ú®ø"«ö¶s¡A«hExit sub¡A ¦pµ{¦¡³Ì«á¤@¦C:
¥i¬Oµ{¦¡°õ¦æ®É¡A«ö¨ú®øÁä³£·|¥X²{¿ù»~°T®§(¦p¤U)¡A¤£·|Exit sub¡A
§ä¤F«Ü¤[¡A¤£¾å±o°ÝÃD¥X¦b­þ¸Ì¡A§Æ±æ°ª¤H«üÂI¤@¤U¡AÁÂÁ°Õ~

*******¿ù»~°T®§***********
°õ¦æ¶¥¬q¿ù»~ '13':

«¬ºA¤£²Å¦X
***************************

******µ{¦¡°Ï*****************
Sub tt()
Worksheets("sheet1").Activate
Set mycell = Application.InputBox( _
    prompt:="Select a cell", Type:=8)

If mycell = False Then Exit Sub   ****³o¤@¦C¬O¦Û¤v¥[¤W¥h¡A­n§PÂ_user­Y«ö¤U"¨ú®ø"«ö¶s¡A«hExit sub

End Sub
************************************************

¦^´_ 1# swatt
  1. Sub tt()
  2. Dim mycell As Range
  3. Worksheets("sheet1").Activate
  4. On Error Resume Next
  5. Set mycell = Application.InputBox(prompt:="Select a cell", Type:=8)
  6. If mycell Is Nothing Then Exit Sub
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


     ·PÁÂGBKEE ¤j¤j¡A
     ¾Ç¨ì¤FOn Error  ¥Îªk¡A¨Ã§Q¥Îrange is nothing ¦¨¥\¸õ¥Xsub¡C

     ¥i§_¦A½Ð±Ð¤@¤U¡A¤§«e§Q¥ÎApplication.inputbox ©Ò¶Ç¦^ªº "False"·|¥¢±Ñ¡A
     ¬O§_¦]¬°¤U­±³o¤@¥y¡A¦]mycell¬°rangeª«¥ó¡AApplication.inputbox ©Ò¶Ç¦^ªº "False"µLªk¼g¤Jmycell¦Ó¾É­P??
   
      Set mycell = Application.InputBox(prompt:="Select a cell", Type:=8)

    ÁÙ¬O¦]¬°¨ä¥L­ì¦]??
    ¯Âºé¥u¬O·Qª¾¹D­ì¦]¡A­Y¤j¤j¦³ªÅ¦A½Ð«ü¾É¤@¤U¡AÁÂÁ°Õ~~

TOP

¦^´_ 3# swatt
§R±¼ Set   ,«á   mycell = Application.InputBox(prompt:="Select a cell", Type:=8)  
§A1¼Óªºµ{§Ç¤¤If mycell = False Then Exit Sub   ´N¨S°ÝÃD

Set ¬O±N ÅÜ¼Æ «ü©w¬°ª«¥ó , Application.InputBox(promptªºType ¤]¥²¶·¬O8
«ö¤U¨ú®øÁä=¨S¦³±Nª«¥ó«ü©wµ¹ÅÜ¼Æ ¦Ó²£¥Í¿ù»~­È

TOP

¦^´_ 4# GBKEE


    ·PÁÂGBKEE¤j¤j¸Ñ´b,
    ­ì¨Ó¬O«ü©wª«¥ó¥¢±Ñ³y¦¨ªº¡A
    ¦]­n±qinputbox¿é¤Jcell¡A©Ò¥HSET´N¨ú®øÅo¡A
    ÁÙ¬O­n¥Î¤j¤j´£¨Ñªº¤èªk¡A
    ¦A¦¸·PÁ¤F~~

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD