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

[µo°Ý] ½Ð¨D«ü¾É²©ö¤ë¾ä¦æ¨Æ¾ä»s§@

[µo°Ý] ½Ð¨D«ü¾É²©ö¤ë¾ä¦æ¨Æ¾ä»s§@

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

¦U¦ì¤j¤j±z¦n¡G
³Ìªñ·Q¥HVBA»s§@¤@­Ó²©ö¤ë¾ä¦æ¨Æ¾ä¡A
¥i¬Oª¦¤F¦n¦h¤å³¹¡A´N¬O§ä¤£¨ì²©ö¤ë¾ä¦æ¨Æ¾äªº½d¨Ò¡A
§Úªº¦æµ{¿é¤Jªí³æ¤w¸g»s§@¦n¤F¡A¬O¥H¤@¦C¬°¤@­Ó¦æµ{¬ö¿ý(Äæ¦ì¥]¬A¦~¡B¤ë¡B¤é¡B¦æµ{¦WºÙ¡B°Ñ¥[¤H­ûµ¥)¡A
²{¦b·Q­n§â¸ê®Æ¿é¥X¬°¤ë¾ä¦æ¨Æ¾ä¡A¥i¬O·Q¯}ÀY³£ÁÙ·Q¤£¥X¸Ó¦p¦ó¤U¤â¡A
·Q­n»s§@ªº¤ë¾ä¦æ¨Æ¾ä®æ¦¡¦pªþÀÉ ¤ë¾ä.rar (4.97 KB) ¡A
¥D­n°ÝÃD¥X¦b¤£ª¾¹D¦p¦ó§â¦hµ§¦æµ{¸ê®Æ¨Ì¤é´Á¿é¥X¨ì¸Ó¤é´ÁªºÀx¦s®æ¡A
½Ð°Ý¸Ó¦p¦ó¥HVBA¦Û°Ê§ì¨ú¦æµ{°O¿ý«á¿é¥X¨ì¤ë¾ä¦æ¨Æ¾ä¡A«ô°U¦U¦ì¤j¤j«üÂIµ¹­Ó¤è¦V¡A·P¿E¤£ºÉ¡I

¤ë¾ä.rar (2.54 KB)

§Ú¬O´µ¦h

¦^´_ 4# Hsieh


³oExcel¤é¾ä«Ü¹ê¥Î¡A¶W·PÁ±zªº!
Just do it.

TOP

¤p§Ì¤£¤~¡A¥»¨Ó¸Õ4¼Ó¶W¯Åª©¥DªºÀɮ׸դ£¥X¨Ó¡C«á¨Óµo²{­ì¨Ó
'Private Sub Worksheet_Activate()    «á¨Óµo²{­ì¨ÓWorksheet­n¥[1
Åܦ¨Private Sub Worksheet1_Activate() ³o¼Ë¤~¶]±o°Ê


Private Sub Worksheet1_Activate()
With ComboBox1
For i = .ListCount - 1 To 0 Step -1
.RemoveItem i
Next
For Y = 1999 To 2100
  .AddItem Y
Next
.Text = Year(Date)
End With

With ComboBox2
For i = .ListCount - 1 To 0 Step -1
.RemoveItem i
Next
For Y = 1 To 12
  .AddItem Y
Next
.Text = Month(Date)
End With
End Sub

TOP

http://blog.xuite.net/hcm19522/twblog/403105361

2327.png (16.01 KB)

2327.png

TOP

³o¦a¤è°ª¤â¶³¶°~·Q­n¾Ç¤°»ò¥i¥H~

³Ìªñ§Ú¤]¬°¤F¤ë¾äªº¨Æ±¡¤j¶Ë¸£µ¬~·Q¤£¨ì¤@¦^¨Ó³o~´Nªï¤b¦Ó¸Ñ

¯u¬O¤Ó´Î¤F

TOP

¦^´_ 4# Hsieh
Hsiehª©¤j¡A±z¦n¡G
¶W¯Å²©ú¤S¹ê¥Î, ¦¬¤U, ÁÂÁÂ!!

TOP

¦^´_ 4# Hsieh

Hsieh¤j¤j¡G
¥t¥~½Ð±Ð±z¤@¤U¡A±zªº°Êµe¬O¦p¦ó»s§@ªº?
¥Î³o­Ó¤èªk¨Ó»s§@±Ð¾ÇÀÉ¡A¦n¹³¤]ÆZ¤£¿ùªº¡C
§Ú¬O´µ¦h

TOP

¦^´_ 4# Hsieh

Hsieh¤j¤j¡A±z¦n¡G
¤µ¤Ñ¥ð°²¡A¤U¤È°_¨Ó¬Ý¨ì±zªº¦^ÂСA¯u¬O¤ÓÅå©_¤F¡A
¤w¸g´ú¸Õ¹L½T¹ê¥i¥H°õ¦æ¡A¨ä¤¤·P¨ì³Ì¯S§Oªºµ{¦¡½X¡G
  1.     For Each Ob In Me.Shapes
  2.         If Not Ob.Name Like "ComboBox*" Then Ob.Delete
  3.     Next
½Æ»s¥N½X
§Ú¬d¤F¤@¤U¡ALikeªº©w¸q¡G¥Î¨Ó¤ñ¸û¨â­Ó¦r¦ê¡A
´ú¸ÕOb.Name±o¨ìComboBox1.ComboBox2.TextBox........
©Ò¥H¡A·N«ä¬O°£¤FComboBox¥~ªºª«¥ó³£§R°£¡F
  1. k = Int((Day(i) + w - 2) / 7)
½Æ»s¥N½X
³o¥y¤]¬O¬ã¨s¥b¤Ñ¡A«á¨Ó¤~·dÀ´¡A
¦]ªí®æ²Ä¤@­ÓÄæ¦ì¬O¬P´Á¤@(vbMonday¡A¤]´N¬O2)¡A
Int¡G¶Ç¦^¼Æ­Èªº¾ã¼Æ³¡¥÷¡A
ÂÇ¥H­pºâ¸Ó¤é´ÁªºÀx¦s®æ¦ì¸m¬O§_¸Ó©¹¤U²¾°Ê¤@¦C¡A
  1.         With Me.Shapes.AddLabel(msoTextOrientationHorizontal, A.Left, A.Top, 10, 72)
  2.             .TextFrame.AutoSize = True
  3.             .TextFrame.Characters.Caption = Day(i)
  4.         End With
½Æ»s¥N½X
¥H«e±q¨S¬Ý¹Lªºµ{¦¡½X¡A³o´N¬O¦Û°Ê¥[¤J¤å¦rª«¥óªº¤èªk¡C

¥u¯à»¡±z¹ê¦b¬O¤Ó¼F®`¤F¡I¤p§Ì¹ê¦b¤Ó·q¨Ø¤F¡I
§Æ±æ¥H«áÁٽбz¦h¦h«ü±Ð¡I
§Ú¬O´µ¦h

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2014-5-28 13:45 ½s¿è

¦^´_ 3# reangame
¦æ¨Æ¾äªº»s§@¡AÀ³¸Ó­n¦³¿ï¾Ü¦~¤ëªº¾÷¨î
³]¸m2­Ó¤U©Ô¿ï³æ¦p°Êµe
¤ë¾ä§¹¦¨«á¡A¦æ¨Æªí³æ§A¦ü¥G¤w¸gª¾¹D¼g¦¨¸ê®Æ®w
¦A±N­n¼g¤J¦æ¨Æ¤ë¾äªºÄæ¦ì§ì¥X¨Ó§Y¥i
play.gif
¤ë¾ä.zip (47.18 KB)
¤u§@ªí¼Ò²Õµ{¦¡½X
  1. Private Sub ComboBox1_Change()
  2. If ComboBox1 <> "" And ComboBox2 <> "" Then ¦æ¨Æ¾ä»s§@
  3. End Sub

  4. Private Sub ComboBox2_Change()
  5. If ComboBox1 <> "" And ComboBox2 <> "" Then ¦æ¨Æ¾ä»s§@
  6. End Sub

  7. Sub ¦æ¨Æ¾ä»s§@()
  8. Dim Ob As Shape, A As Range
  9. For Each Ob In Me.Shapes
  10. If Not Ob.Name Like "ComboBox*" Then Ob.Delete
  11. Next
  12. [B3:H8].Clear
  13. day1 = DateSerial(Val(ComboBox1), Val(ComboBox2), 1)
  14. day2 = DateSerial(Val(ComboBox1), Val(ComboBox2) + 1, 0)
  15. w = Weekday(day1, vbMonday)
  16. For i = day1 To day2
  17. k = Int((Day(i) + w - 2) / 7)
  18. s = Weekday(i, 2)
  19. Set A = [A3].Offset(k, s)
  20. If s >= 6 Then A.Interior.ColorIndex = 36
  21. With Me.Shapes.AddLabel(msoTextOrientationHorizontal, A.Left, A.Top, 10, 72)
  22. .TextFrame.AutoSize = True
  23.   .TextFrame.Characters.Caption = Day(i)
  24. End With
  25. Next

  26. With Range([B3], Cells(A.Row, 8))
  27. For j = 1 To 4
  28.   With .Borders(j)
  29.    .LineStyle = 1
  30.    .Weight = 2
  31.    .ColorIndex = xlColorIndexAutomatic
  32.   End With
  33. Next
  34. End With
  35. End Sub

  36. Private Sub Worksheet_Activate()
  37. With ComboBox1
  38. For i = .ListCount - 1 To 0 Step -1
  39. .RemoveItem i
  40. Next
  41. For Y = 1999 To 2100
  42.   .AddItem Y
  43. Next
  44. .Text = Year(Date)
  45. End With

  46. With ComboBox2
  47. For i = .ListCount - 1 To 0 Step -1
  48. .RemoveItem i
  49. Next
  50. For Y = 1 To 12
  51.   .AddItem Y
  52. Next
  53. .Text = Month(Date)
  54. End With
  55. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

Hsieh¤j¤j¡A±z¦n¡G
¤£¦n·N«ä¡A¬Q¤Ñ¥X®t¨S¿ìªk¤Wºô¨Ó¦^Âбz¡Aªí³æ¦p¤U¡G
¦æµ{ªí³æ.rar (47.69 KB)
¥ý¸ò±z³ø§i¡A¥D­n¬O·Q¥HVBA¦Û°Ê¤Æ§â¤@¾ã­Ó¤ëªº¸ê®Æ¿é¥X¦¨¤ë¾ä¦æ¨Æ¾ä¡A
¦Û°Ê¤Æ¥X²{¬Y¤@­Ó¤ëªº¤ë¾ä¡A¦æµ{¸ê®Æ¨Ì¤é´Á¶ñ¤J¸Ó¤é´ÁªºÀx¦s®æ¡A¦pªG¦P¤@¤Ñ¦³¦h³õ¦æµ{¡AÀx¦s®æ¤º¥H¤@¦æ¤@µ§¦æµ{(´«¦æ)Åã¥Ü¡A
½Ð«ü¾É¤@¤U¡A
²Ä¤@¡G¦p¦ó¦Û°Ê¤Æ§ì¨ú¬Y¤@­Ó¤ë¥÷Åý¸ê®ÆÅã¥Ü¹³1¼Óªº¤ë¾ä®æ¦¡¡A
²Ä¤G¡G¦p¦ó±N¸ê®Æ¨Ì¤é´Á¶ñ¤J¸Ó¤é´ÁÀx¦s®æ¡A(¥i¯à·|¦³¤é´Á¨S¦æµ{¡A¥B¤ë¾äªº¤é´Á¤£¬°©T©w¦ì¸m)

¥H¤W¡A¥D­nÁÙ¬O¥H²Ä¤@­Ó°ÝÃD¬°¥D¡A¦]¤£ª¾¹D¦p¦ó¦Û°Ê¤ÆÅã¥Ü¤ë¾ä®æ¦¡ªºµ{¦¡½X¼gªk¡A©Ò¥H¡A²Ä¤G°ÝÃD³s´ú¸Õ³£¨S¿ìªk¡A½Ð¤j¤j¨ó§U©ÎªÌµ¹­Ó¤è¦V¡A·P¿E¤£ºÉ¡I
§Ú¬O´µ¦h

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD