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

ªí³æªº2­ÓTextBox¦P¨B¥[Á`

ªí³æªº2­ÓTextBox¦P¨B¥[Á`

½Ð±Ð¦U¦ì¦Ñ®v­Ì¦p¦ó¦bªí³æ¸ÌªºTextBox2¿é¤J¦~.¤ë.¤é(2012/07/20)¡A¦bLabel1ªº¤é´Á(¦~.¤ë.¤é)°£¤F­n«O¦³»PTextBox1ªº¦~¥[Á`¥~¡AÁÙ­n¸òTextBox2ªº¤é´Á§@¦P¨Bªº¥[Á`ÅÜ°Ê¡C
20120720.rar (88.89 KB)

³Â·Ð¦U¦ì¥ý®v­Ì«ü±Ð¡AÁÂÁÂ!

¥»©«³Ì«á¥Ñ kimbal ©ó 2012-7-21 00:30 ½s¿è
½Ð±Ð¦U¦ì¦Ñ®v­Ì¦p¦ó¦bªí³æ¸ÌªºTextBox2¿é¤J¦~.¤ë.¤é(2012/07/20)¡A¦bLabel1ªº¤é´Á(¦~.¤ë.¤é)°£¤F­n«O¦³»PTe ...
man65boy µoªí©ó 2012-7-20 23:46


6 / 10 ¨â¦æ¬O¤@¼Ëªº
¥H¨¾¤é¤ë¤ÏÂà,¥Î¤Fdateserial
ªºTextBox1_Change¤èªk, 2/29¤é¬O·|¦³°ÝÃDªº,§Ú¤@¨Ö§ï¤F.
  1. Private Sub UserForm_Initialize()
  2.     Label1 = Format(Date, "yyyy/mm/dd")
  3.     TextBox2.Text = Format(Date, "yyyy/mm/dd")
  4. End Sub
  5. Private Sub TextBox1_Change()
  6.     Label1 = Format(DateSerial(Left(TextBox2, 4) + IIf(Val(TextBox1) <> 0, Val(TextBox1), 0), Mid(TextBox2, 6, 2), Right(TextBox2, 2)), "yyyy/mm/dd")
  7. End Sub
  8. Private Sub TextBox2_Change()
  9.     If IsDate(TextBox2) Then
  10.         Label1 = Format(DateSerial(Left(TextBox2, 4) + IIf(Val(TextBox1) > 0, Val(TextBox1), 0), Mid(TextBox2, 6, 2), Right(TextBox2, 2)), "yyyy/mm/dd")
  11.     End If
  12. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_ 2# kimbal
·PÁ¦Ѯvªº¦^µª¡A¯u¬O¤Ó§®¤F!
¦A½Ð°Ý¦Ñ®v¡ALabel1ªºmm(¤é)­n´î¤@¤Ñ¡A­n¦p¦ó¤U¤â¡A
ÁÙ¦³¦p¦óÅýTextBox2.Text = Format(Date, "yyyy/mm/dd")¦bÅã²{«áÀH·N§ó§ï ¦~or¤ëor¤é
¤£­n¶]¥X"«¬ºA¤£²Å¦X"
¦A¦¸¦a·PÁ¦Ѯvªº¦^µª¡C

TOP

¦^´_ 3# man65boy
  1. Private Sub TextBox2_Change()
  2. If IsDate(TextBox2) Then
  3. Label1.Caption = DateAdd("yyyy", Val(TextBox1), CDate(TextBox2)) - 1'¼ÐÅÒ¤é´Á¬°TextBox2¥[¤WTextBox1¦~ªº«e¤@¤Ñ
  4. End If
  5. End Sub

  6. Private Sub UserForm_Initialize()'°_°Êªí³æ¦Û°ÊÅã¥Ü·í¤Ñ¤é´Á
  7. TextBox2.Text = Format(Date, "yyyy/mm/dd")
  8.     myday = Format(Date, "yyyy")
  9.     Label1 = myday
  10. End Sub
  11. Private Sub TextBox1_Change()
  12. Label1.Caption = DateAdd("yyyy", Val(TextBox1), CDate(TextBox2)) - 1'¼ÐÅÒ¤é´Á¬°TextBox2¥[¤WTextBox1¦~ªº«e¤@¤Ñ
  13. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh


    ·PÁ¦Ѯvªººë²Óªº¦^µª¡A¤£§÷¤p§Ì¤wª¾¸Ó¦p¦óÀ³¥Î¤F¡AÁÂÁ§A!

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD