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

[µo°Ý] call ¼Ò²Õ«á²Å¦X±ø¥ó®É¡A¦p¦ó°±¤îµ{¦¡½X°õ¦æ?

[µo°Ý] call ¼Ò²Õ«á²Å¦X±ø¥ó®É¡A¦p¦ó°±¤îµ{¦¡½X°õ¦æ?

¥»©«³Ì«á¥Ñ reangame ©ó 2014-5-22 00:05 ½s¿è

°õ¦æ¤@­Ó¤é´Á¿ï¾Üªí³æ¡AÂI¿ï½T©w«á°õ¦æCall tutu¼Ò²Õ¡A
  1. Sub tutu()
  2.    
  3.     Set sh = Sheets("¶}¥ð¥«¤é´Áªí")
  4.     Set r = sh.Columns("B").Find(md)
  5.     If Not r Is Nothing Then
  6.         md = ""
  7.     End If
  8.     If week = "¬P´Á¤»" Or week = "¬P´Á¤é" Or md = "" Then
  9.         MsgBox "©Ò¿ï¤é´Á¬°¥¼¶}½L¤é¡A½Ð­«·s¿ï¾Ü¡I", 0, "¨t²Î°T®§"
  10.         End
  11.     End If

  12. End Sub
½Æ»s¥N½X
²Å¦X±ø¥ó«á°±¤îµ{¦¡½XÄ~Äò°õ¦æ¡A¦ý¥X²{¤@­Ó°ÝÃD¡A°±¤î«á³sªí³æ³£Ãö³¬¤F¡A
½Ð°Ý¸Ó¦p¦ó­×§ï¥i¹F¦¨¤£Ãö³¬ªí³æ¦Ó°±¤îµ{¦¡½X°õ¦æ?
§Ú¬O´µ¦h

¸É¥R¤@¤U¡A°ÝÃDÀ³¸Ó¬O¥X¦b¥N½X²Ä10¦æ¡A§âEnd§ó§ï¬°Exit  sub®É¡A¥u·|°±¤î¼Ò²Õªºµ{¦¡½X¡AÁÙ¬O·|Ä~Äò°õ¦æªí³æªºµ{¦¡½X¡A¦p¦ó¥þ³£°±¤î¤S¤£Ãö³¬ªí³æ?
§Ú¬O´µ¦h

TOP

¸É¥R¤@¤U¡A°ÝÃDÀ³¸Ó¬O¥X¦b¥N½X²Ä10¦æ¡A§âEnd§ó§ï¬°Exit  sub®É¡A¥u·|°±¤î¼Ò²Õªºµ{¦¡½X¡AÁÙ¬O·|Ä~Äò°õ¦æªí³æ ...
reangame µoªí©ó 2014-5-22 00:07

§â²Ä¤Q¦æ²¾°£´N¦æ¤F¡C
If ...... End If °õ¦æ§¹²¦µ{¦¡½X«K·|©¹¤U°õ¦æ¡Aª½¨ì End Sub §Y¦æ¸õÂ÷¸Óµ{¦¡¼Ò²Õ (Sub tutu()  ~  End Sub)¡C

TOP

¦^´_ 1# reangame
§Aªºtutu¥i¥H§ï¥Îfunction¨Ã¦^¶Çtutuªº°õ¦æª¬ªpµ¹©I¥s¥¦ªº¦a¤è¡A¦A§PÂ_¸Ó«ç»ò¸õ¥X¡C

¦p:
  1. Function tutu() as boolean
  2.     Set sh = Sheets("¶}¥ð¥«¤é´Áªí")
  3.     Set r = sh.Columns("B").Find(md)
  4.     If Not r Is Nothing Then
  5.         md = ""
  6.     End If
  7.     If week = "¬P´Á¤»" Or week = "¬P´Á¤é" Or md = "" Then
  8.         MsgBox "©Ò¿ï¤é´Á¬°¥¼¶}½L¤é¡A½Ð­«·s¿ï¾Ü¡I", 0, "¨t²Î°T®§"
  9.         tutu = false
  10.     else
  11.         tutu = true
  12.     End If
  13. End Function
½Æ»s¥N½X
©I¥stutuªºªí³æ«ö¶s:
  1. Private Sub CommandButton1_Click()
  2.     if not tutu then exit sub
  3. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# c_c_lai

c_c_lai¤j¤j¡A±z¦n¡G
±zªº¤èªk¤w¸g´ú¸Õ¹L¤F¡A§âEnd²¾°£±¼«á¡Aªí³æ¤ºªºµ{¦¡½X¨Ì·|°õ¦æ¡A§Úªº»Ý¨D¬O¥ýCall¼Ò²Õµ{¦¡½X°õ¦æ¡A²Å¦X±ø¥ó«á¡A³s¦Pªí³æ¤¤ªºµ{¦¡½X¤@°_°±¤î°õ¦æ¡A¤£¦n·N«ä³á¡I
§Ú¬O´µ¦h

TOP

¥»©«³Ì«á¥Ñ reangame ©ó 2014-5-24 17:49 ½s¿è

¦^´_ 4# stillfish00

stillfish00¤j¤j¡A±z¦n¡G
±zªºµ{¦¡½X½T¹ê¥i¥H°±¤î¡i¿ï¾Ü¦¬½L¤é´Á¡jªí³æ¤¤ªºµ{¦¡½XÄ~Äò¹B¦æ¡A¦ý²£¥Í¤@­Ó©µÄò©Êªº°ÝÃD¡A½Ð¬Ýªþ¹Ï¡G
555.jpg
ªí³æ¤¤ªºLabel=¡i¬P´Á¤»¡j¬°ComboBox_Change¦Û°Ê²£¥Í¡A¡iweek¡jµ{¦¡½X¦p¤U¡A
  1. Function week()
  2.     week = Format(DateSerial(ComboBox3.Text, ComboBox2.Text, ComboBox1.Text), "[$-404]aaaa;@")
  3. End Function
½Æ»s¥N½X
¿ï¾Ü§¹¤é´Á«áÂI¿ï½T©w¡ACall tutu¼Ò²Õ«á¡A¤£ºÞ¿ï¾Ü­þ¤@¤Ñ³£¬O¥X²{¡i©Ò¿ï¤é´Á¬°¥¼¶}½L¤é¡A½Ð­«·s¿ï¾Ü¡I¡j¡A¤]´N¬O§¡¤£²Å¦X©Ò³]©wªº±ø¥ó¡A
¸g¸Ô²Ó¬ã¨sµo²{¡Gtutu¼Ò²ÕµLªk§PÂ_ªí³æ¤¤¡iweek¡jªº­È¡A
½Ð°Ý¸Ó¦p¦ó±Nªí³æ¤¤¡iWeek¡jªº­È¶Ç¨ìtutu¼Ò²Õ?
ÁÙ½ÐÄ~Äò«ü¾É¡A·PÁ¤j¤j!!!
§Ú¬O´µ¦h

TOP

¦^´_  c_c_lai

c_c_lai¤j¤j¡A±z¦n¡G
±zªº¤èªk¤w¸g´ú¸Õ¹L¤F¡A§âEnd²¾°£±¼«á¡Aªí³æ¤ºªºµ{¦¡½X¨Ì·|°õ¦æ ...
reangame µoªí©ó 2014-5-24 17:34

¦pªG§A»Ý­n©I¥s¼ÒèʦA°µ§PÂ_¡A«h½Ð¦Û¦æ­×¥¿¦¨ stillfish00 ªº²[¦¡¡A
Function tutu() as boolean ¦p¬O²Å¦X±ø¥ó«á¡A³s¦Pªí³æ¤¤ªºµ{¦¡½X¤@°_°±¤î°õ¦æ¡C

TOP

¥»©«³Ì«á¥Ñ reangame ©ó 2014-5-25 16:37 ½s¿è

¦^´_ 7# c_c_lai

c_c_lai¤j¤j¡A±z¦n
§Ú¤w¸g­×§ï¤F¡A¥i¬O¦³­Ó¤p°ÝÃD¡A6¼Óªº¦^ÂÐhttp://forum.twbts.com/redirect. ... 5&fromuid=10492
ªí³æªº­È¡A¼Ò²Õ§PÂ_¤£¨ì=.=
¥i¥H«ü¾É¤@¤U¶Ü?
§Ú¬O´µ¦h

TOP

¦^´_ 4# stillfish00
¦^´_ 7# c_c_lai

¨â¦ì¤j¤j¡A±z¦n¡G
§Ú¸Ñ¨M°ÝÃD¤F¡A¸Ñ¨M¤è¦¡¦p¤U¡G
  1. Function tutu() As Boolean
  2.     Set sh = Sheets("¶}¥ð¥«¤é´Áªí")
  3.     md = ¿ï¾Ü¦¬½L¤é´Á.ComboBox2.Value & "¤ë" & ¿ï¾Ü¦¬½L¤é´Á.ComboBox1.Value & "¤é"
  4.     Set r = sh.Columns("B").Find(md)
  5.      If Not r Is Nothing Then
  6.         md = ""
  7.     End If
  8.      If ¿ï¾Ü¦¬½L¤é´Á.Label1 = "¬P´Á¤»" Or ¿ï¾Ü¦¬½L¤é´Á.Label1 = "¬P´Á¤é" Or md = "" Then
  9.         MsgBox "©Ò¿ï¤é´Á¬°¥¼¶}½L¤é¡A½Ð­«·s¿ï¾Ü¡I", 0, "¨t²Î°T®§"
  10.         tutu = False
  11.     Else
  12.         tutu = True
  13.     End If
  14. End Function
½Æ»s¥N½X
±o¨ì¤@­Óµ²½×¡G
´N¬O¦b¼Ò²Õµ{¦¡½X¤¤¡A­n¨ú¥Îªí³æªº­È®É¡A¥²¶·«ü©wªí³æªºª«¥ó¦WºÙ(¦p¡G¿ï¾Ü¦¬½L¤é´Á.ComboBox2¡B¿ï¾Ü¦¬½L¤é´Á.Label1 )¡A
¤§«e³£¨S¦³«ü©wªí³æ¦WºÙ¡A³£ª½±µ¨Ï¥Î  ComboBox2.Value¡A¦]¦¹¼Ò²Õ³£§ì¤£¨ìªí³æªº­È¡C
¦ý¬O.....ªí³æ¤¤ªºµ{§Ç¡A¦p¤U¡G
  1. Function week()
  2.     week = Format(DateSerial(ComboBox3.Text, ComboBox2.Text, ComboBox1.Text), "[$-404]aaaa;@")
  3. End Function
½Æ»s¥N½X
¤´µM¤£ª¾¹D¸Ó¦p¦óÅý¼Ò²Õ§ì¨ú¨ì³o­Óµ{§Çªº­È¡A
¦]¦¹¡A§Ú±Nweekªº­È§ï¥Î¿ï¾Ü¦¬½L¤é´Á.Label1¨Ó¥N´À¡A
¤£¹LÁÙ¬O«Ü·Qª¾¹Dªí³æ¤¤¡Aµ{§Ç©Ò²£¥Íªº­È¦³¤°»ò¿ìªk¥i¥HÅý¼Ò²Õª½±µ¨ú¥Î???
§Ú¬O´µ¦h

TOP

¦^´_ 9# reangame
  1. Function week(Text3 As String, Text2 As String, Text1 As String) As String
  2.     week = Format(DateSerial(Text3, Text2, Text1), "[$-404]aaaa;@")
  3. End Function

  4. Sub Test()
  5.    Dim txt As String
  6.    
  7.    txt = week("2014", "5", "24")
  8.    MsgBox txt
  9. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD