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

ComboBox¿ï¦n¤å¦r«á¡AÄæ¦ì¨SªF¦è

ComboBox¿ï¦n¤å¦r«á¡AÄæ¦ì¨SªF¦è

¥»©«³Ì«á¥Ñ Jared ©ó 2013-2-25 16:26 ½s¿è

¦U¦ì¤j¤j¦n
¤p§Ì§Ú¤é«e¬ã¨s¢ä¢Ð¢Ï¥Îªk
¦ýµ{¦¡¼gªkÁÙ¬O¦³¨Ç¤£©ú¥Õ

¥Ø«e¹J¨ìªº°ÝÃD¬O
¥Î·N¬O­nªí³æ¥Î¤U©Ô¦¡¿ï³æ¿ï¾Ü§¹¦~¤ë¤é«á
¶Ç¦^Sheetªº¬Y­ÓÄæ¦ì
¦ý¬O§Úªºµ{¦¡Åܦ¨ªì©l­ÈÅã¥Ü¬OªÅ¥Õ¡AÁÙ¥i¥H¶ñ¼g¡]¥¿±`¬O¦³¹w³]­È¡A¨Ã¥BµLªk°µ­×§ïªº°Ê§@¡^
ÁöµM¤U©Ô¦¡¿ï³æ¤w¸g¿ï¦n¤å¦r
¥i¬O¶Ç¦^Sheet«á¬OªÅ¥Õ¨SªF¦è
¥H¤U¬O§Ú¥Ø«e¼gªº
³Â·Ð¦U¦ì¤j¤j¯àÀ°§Ú¸Ñ´b
·P¿E¤£ºÉ!!!:dizzy:
¿Ã¹õºI¹Ï00030.jpg
¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð
Private Sub CommandButton1_Click()
Call test2
End Sub
¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð
Sub test2()
Dim X

a1 = test.Box1.Value '¦~
a2 = test.Box2.Value '¤ë
a3 = test.Box3.Value '¤é

X = ("a1") & (".") & "a2" & (".") & "a3"


If Application.CountBlank([C5:C99]) = 0 Then Range("C100") = X: Exit Sub
For Each a In [C5:C99]
    If a = "" Then
        a.Value = X
        Exit For
    End If
Next

End Sub
Jared

¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-3-1 11:10 ½s¿è

¦^´_ 14# Jared
§R°£³o¨â­Ó±±¨î¶µComboBox1¡BComboBox2
­«·s³]¸m¡A³o¥i¯à§A¦b­«·s©R¦W«á´¿¸g¦³·s¼WComboBox±±¨î¶µµM«á§R°£
¾É­P°O¾Ð¤¤ªº´Ý¯dª«¥ó¡A·íµM³o¥u¬O²q´ú¡A­Y¦³ª¾¹D½T¹ê­ì¦]ªÌ¡A½Ð¤£§[«ü¥¿
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 11# Hsieh


·PÁ¤j¤jªº¨ó§U
¦ý¬O§Ú¤£©ú¥Õªº¬O
°õ¦æ³o¦æµ{¦¡
If Val(ComboBox1) > 0 And Val(ComboBox2) > 0 Then
´N¥X²{
¿Ã¹õºI¹Ï00050.jpg
¤£ª¾¹D¬O¤°»ò°ÝÃD¡Ö"¡Õ
Jared

TOP

¦^´_ 12# mark15jill

ÁÙ¨S¦³...>"<
ÁÙ¦b§ä´M¨ä¥L¿ìªk
Jared

TOP

¦^´_ 10# Jared


    ¤£·|°Õ£¾£¾
¥u¬O§Ú¤ñ¸ûÂû±C¦Ó¤w..
¸Ü»¡ ±zªº°ÝÃD¦³¸Ñ¨M¤F¶Ü?

  ¦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

¦^´_ 9# Jared
­n¤F¸Ñ¨Æ¥óµ{§ÇªºÄ²µo®É¾÷
§Aªº¬yµ{¬O¦b¶}±Òªí³æ®É´NÅýComboBox¸ü¤J²M³æ
¿ï¾Ü¦~¡B¤ë«áComboBox3¥i§PÂ_³Ì«á¤é´Á¦Ó¸ü¤J²M³æ
¦ÓTextBox1ª½±µÅã¥Ü·í¤Ñ¤é´Á
  1. Private Sub ComboBox2_Change()
  2. chang_day
  3. End Sub

  4. Private Sub ComboBox3_Change()
  5. chang_day
  6. End Sub

  7. Private Sub CommandButton1_Click()
  8. Dim A As Range
  9. If Application.CountBlank(Sheet10.Range("A5:A99")) = 0 Then
  10. Sheet10.[A100] = DateSerial(ComboBox1.Value, ComboBox2.Value, ComboBox3.Value) 'DateSerial¬°¤é´ÁÄÝ©Ê
  11. Else
  12. Set A = [A5]
  13. Do Until A = ""
  14.     Set A = A.Offset(1, 0)
  15. Loop
  16. A.Value = DateSerial(ComboBox1.Value, ComboBox2.Value, ComboBox3.Value) 'DateSerial¬°¤é´ÁÄÝ©Ê
  17. End If
  18. End Sub


  19. Private Sub UserForm_Initialize()
  20. For i = 2013 To 2020
  21.     ComboBox1.AddItem i
  22. Next
  23. For i = 1 To 12
  24.     ComboBox2.AddItem i
  25. Next
  26. For i = 1 To 31
  27.     ComboBox3.AddItem i
  28. Next
  29. b21 = Date

  30. End Sub
  31. Sub chang_day()
  32. If Val(ComboBox1) > 0 And Val(ComboBox2) > 0 Then
  33. ComboBox3.Clear
  34. For i = 1 To Day(DateSerial(ComboBox1.Value, ComboBox2.Value + 1, 0))
  35.    ComboBox3.AddItem i
  36. Next
  37. End If
  38. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# mark15jill
©êºp>"<
§Æ±æ¨S¦³³y¦¨¥ô¦ó¤Hªº§xÂZ
Jared

TOP

¦^´_ 6# Hsieh
´ú¸ÕÀÉ.zip (23.54 KB)

©êºp! §¨±aÀɮצpªþ¥ó
DateSerial ªº»yªk¬O±N¿ï³æªº¼Æ¦r§PÂ_¬°¤é´Á
¦ý¬O¿ï³æ¿ï¾Üªº¼Æ­È«oµLªk§ì¨ì

¨C«ö¤@¦¸Button±N¸ê®Æ°e¥X
¼Æ­È´N¦b¿ï³æ¸ÌÀY½Æ»s¤@¦¸
¤£¾å±o­ì¦]¬°¦ó

ÁٽФj¤j¸Ñ´b
·P¿E¤£ºÉ!! >"<

¿Ã¹õºI¹Ï00042.jpg (43.05 KB)

¿Ã¹õºI¹Ï00042.jpg

¿Ã¹õºI¹Ï00043.jpg (12.74 KB)

¿Ã¹õºI¹Ï00043.jpg

Jared

TOP

¥t¥~¡A³o°ÝÃDÀ³¸Ó¬OÄÝ©óµ{¦¡°Ï¶ô§a... «ç¶]¨ì¤@¯ë°Ï ==

  ¦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

ÁÂÁ¤j¤jªº¨ó§U
²×©ó¥i¥H¦^¶Ç¤U©Ô¦¡¿ï³æªº°T®§
¦ý¬O¤£¾å±o¬°¤°»ò
­ì¥»©R¦Wªº¤U©Ô¦¡¿ï³æ¬°¡yBox1¡z
Shee ...
Jared µoªí©ó 2013-2-27 10:13



   
²×©ó¥i¥H¦^¶Ç¤U©Ô¦¡¿ï³æªº°T®§
¦ý¬O¤£¾å±o¬°¤°»ò
­ì¥»©R¦Wªº¤U©Ô¦¡¿ï³æ¬°¡yBox1¡z
Sheet1.[A100] = DateSerial(Box1, Box2, Box3)
·|¥X²{§ä¤£¨ì¦¨­ûªºÄµ§iµøµ¡

³oÂI¡A§A¦b«Å§i®É¡A¦³µL±N Box1«Å§i¦¨  ComboBox1
¦pªG¨S¦³¡A·íµM§ä¤£¨ì..


­n§ï¬°ComboBox3 ªº¦WºÙ¤~¨S¦³¥X¿ù
¦ý¬O§Ú­ì¥»³]©w­n±N³o¤T­ÓÄæ¦ìªº¼Æ­È
¤À§O¬°¦~¤ë¤é
³£¶Ç¨ìÄæ¦ì®ÉÅܦ¨§¹¾ã¤é´Á[¨Ò¦p¡G2013/02/28]
¦ý¶Ç¨ìA1®É¡A¤@«ßÅã¥Ü1999/11/30(¦p¹Ï)
¤£¾å±o¬°¤°»ò

³oÂI¡AMS Office ªº®É¶¡¹w³]­È­ì¥»´N¤£¬O·Ó¥¿±`ªº®É¶¡¹w³]
°£«D¥t¥~³]©w¡Aºô¸ô¤W¦³¤èªk

  ¦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 : ¦³®É·í«äµL®É­W¡A¦n¤Ñ­n¿n«B¨Ó³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD