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

[µo°Ý] ½Ð±Ð µ{¦¡°Ï¶ô ¶}©l»Pµ²§ô

[µo°Ý] ½Ð±Ð µ{¦¡°Ï¶ô ¶}©l»Pµ²§ô

·Q½Ð°Ý
¦p
sub          & end sub
for           & next
select      & end sub
if              & endif
¥H¤W¬O¤ñ¸û±`¨£ªº ¶}©l  /  µ²§ô ²Õ¦X
¦ý¬O  
¦³¬Ý¨ì¤@ºØ

if  then   :  xxxxxx   ¨S endif (xxxxxx ¬°°Ñ¼Æ  ¨Ò¦p  r=r+1

·Q½Ð°Ý ³o¬O¤°»ò­ì¦]

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

¦^´_ 1# mark15jill
If...Then...Else  ¬O³æ¦æ§Î¦¡ ( ²Ä¤@ºØ»yªk ) ¨Ó²¤Æµ{¦¡½X
¦p¨Ò:¬O¤@¼Ëªº
  1. If a = b Then
  2. MsgBox a
  3. End If
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


    ¨Ò¦p
r=1
if  a=b then c=d : r=r+1

³o¬O??

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 3# mark15jill
¨º¬O²¤Æµ{¦¡½Xªº¼gªk
  1. r = 1
  2.     If a = b Then
  3.         c = d
  4.         r = r + 1
  5.     End If
½Æ»s¥N½X

TOP

¦^´_  mark15jill
¨º¬O²¤Æµ{¦¡½Xªº¼gªk
GBKEE µoªí©ó 2012-9-11 16:43


¤£¦n·N«ä ¤p§Ì¸ê½è·M¬N
¦A½Ð±Ð

²¤Æªº¸Ü

r= 1 ¬O°ò¦­È?
1¡B­Y­n±N R  ³]©w¦¨ ½d³ò(range) ¸Ó¦p¦ó³]©w
2¡B ­n¦p¦ó­­¨î¸Ó½d³ò(¨Ò¦p ROWS ©M Columns

¤£¦n·N«ä
¦]³Ìªñ­n±N¥H«eªºµ{¦¡Â½·s²¤Æ.. ©Ò¥H¦b§ä¨ä¥L¤èªk½s¼g

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 5# mark15jill
§A³o¼Ëªº°Ýªk«ÜÅ¢²Î!
¥i¥Hªþ¤W¤@¬q§¹¾ãªºµ{§Ç,©ÎÀÉ®×»¡©ú§Aªº´Á±æ

TOP

if...ªº·N«äÀ³¸Ó¬O°²³]§a
then...ªº·N«äÀ³¸Ó¬O°²³]¤£¬O¤°»ò´N·|¬O¤°»òªº·N«ä¡A
À³¸Ó¬O³o¼Ë¤lªº§a~~~

TOP

¦^´_ 7# n1318
If...Then...Else ³¯­z¦¡
®Ú¾Ú¬Y¹Bºâ¦¡ªº­È¨Ó¨M©w­n°õ¦æ­þ¨Ç³¡¥÷ªº³¯­z¦¡¡C
»yªk

If condition Then [statements][Else elsestatements]

©ÎªÌ¡A§A¥i¥H¨Ï¥Î°Ï¶ô§Î¦¡»yªk¡G
If condition Then
[statements]
[ElseIf condition-n Then
[elseifstatements]...
[Else
[elsestatements]]
End If

½Ðª`·N
§A¥i¥H¨Ï¥Î³æ¦æ§Î¦¡ ( ²Ä¤@ºØ»yªk ) ¨Ó²¤Æµ{¦¡½X¡A
¦ý¬O¡A°Ï¶ô§Î¦¡ ( ²Ä¤GºØ»yªk ) «h´£¨Ñµ²ºc¤Æ»P¼u©Êªº¥\¯à¡A
¦Ó¥B¤]¸û®e©ö¾\Ū¡BºûÅ@¡B ¤Î°£¿ù¡C

ªþµù ¦b³æ¦æ§Î¦¡¤¤¡A¤]¥i¥H©ñ¤W¦h¦æªº³¯­z¦¡¡A
¥u­n¦b³o¨Ç³¯­z¦¡¶¡¥[¤W "«_¸¹" §Y¥i¡A¦p©³¤U³o¦æ³¯­z¦¡©Ò¥Ü¡G

    If A > 10 Then A = A + 1 : B = B + A : C = C + B

©ÎªÌ¡A§A¥i¥H¨Ï¥Î°Ï¶ô§Î¦¡»yªk¡G

    If A > 10 Then
          A = A + 1
          B = B + A
          C = C + B
    End If

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2012-9-11 20:29 ½s¿è
·Q½Ð°Ý
¦p
.
.
select      & end sub
mark15jill µoªí©ó 2012-9-11 15:27

³oÃä§ó¥¿¤@ÂI :
Select Case «á­±¥[ªº¬O End Select ¦Ó¤£¬O end sub ³á.

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2012-9-12 08:22 ½s¿è

¦^´_ 8# c_c_lai


    ÁÂÁ¤j¤j  ³o¼Ë§ÚÀ´¤F
    «_¸¹ µø¬° then ´N¹ï¤F..



luhpro ¤j¤j  ©êºp ¨º¬O¥´ end sub ¥´²ßºD£½£¿"
·PÁ±zªºªÈ¥¿

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

        ÀR«ä¦Û¦b : ¦Û¤v®`¦Û¤v¡A²ö¹L©ó¶ÃµoµÊ®ð¡C
ªð¦^¦Cªí ¤W¤@¥DÃD