½Ð±Ð VBA ¦p¦ó¤é´Á+®É¶¡Âà¤Æ¬°¤å¦r
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
½Ð±Ð VBA ¦p¦ó¤é´Á+®É¶¡Âà¤Æ¬°¤å¦r
Format()¥i¥H³B¸Ì®É¶¡?
1.³o¬O·Qnªºµ²ªG>> 2020_7_16_PM_02_29_25
2.³£¥Î³o¤g¤èªk¸Ñ¨M¦Û°Ê¥t¦s³Æ¥÷ÀÉ,¥[¦bÀɦW¤¤,¦]¬°ÀɦW¤£·|«½Æ
ActiveWorkbook.SaveAs Filename:= ~~ & _
Replace(Date, "/", "_") & Replace(Replace(Replace(Time, ":", "_"), "¤W¤È ", "_AM_"), "¤U¤È ", "_PM_")
3.¦³¨ä¥L¤èªk? |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 2833
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2889
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-17
|
MsgBox Application.Text(Now(), "yyyy\_m\_d\_¤W¤È/¤U¤È\_hh\_mm\_ss") |
|
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 2# ã´£³¡ªL
¦¬¨ì ÁÂÁÂã¤j
²{¦b¨S¦³¹q¸£¥i¸Õ
¬O¥Î³oºØ¤è¦¡¦bVBA¸Ì ³£¥i¥H°õ¦æ¤½¦¡±o¨ìȪº·N«ä¶Ü¡H¨S¥Î¹L! ©ú¤Ñ´ú¸Õ«á¦A½Ð±Ð
³o´X¦~³£¨S¤°»ò¶i¨B
¤@©Û¥b¦¡¼g¤F¤@°ï³ô¥Îªºµ{¦¡¡A¤u§@°ÝÃD¬O¸Ñ¨M¤F
¦ý¬O®Ä¯à¬O¤@¤j°ÝÃD¡A¦³¨Ç¨C¤Ñn°õ¦æªºµ{¦¡¤@«ö¤U¥h´N±o¶]2Ó¦h¤p®É
¦A¦hªº²z¥Ñ ³£¬O¯î¼o¾Ç²ßªºÂǤf
½Ð¦h«ü±Ð |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 3# Andy2483
²z¸Ñ¤@ÂIÂI!
1.¨CºØ¨ç¼Æ¦bÀx¦s®æ©MVBA¸Ìªº³¯z¤è¦¡¦³®t²§
2.VBAn¦bÀx¦s®æ¸Ì³¯z¤½¦¡¤è¦¡¤]¤£¦P,¦U¦³³W«h
ÁÂÁÂ
Sub test_20200807_7()
MsgBox Application.ExecuteExcel4Macro("numberstring(123456789,2)")
[A1] = "=numberstring(123456789,2)"
MsgBox [A1].Value
MsgBox Application.Text(Now(), "yyyy\_m\_d\_AM/PM\_hh\_mm\_ss")
[A1] = "=TEXT(NOW(), ""yyyy" & "\" & "_m" & "\" & "_d" & "\" & "_AM/PM" & "\" & "_hh" & "\" & "_mm" & "\" & "_ss"")"
MsgBox [A1]
MsgBox Application.Sum([A2:A10])
[A1] = "=Sum(A2:A10)"
MsgBox [A1]
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 2833
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2889
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-17
|
¦^´_ 4# Andy2483
[A1] = "=Text(Now(), ""yyyy\_m\_d\_¤W¤È/¤U¤È\_hh\_mm\_ss"")" |
|
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 5# ã´£³¡ªL
§Ñ¤F¿ý»s¥¨¶°´N¥i¥H¤Ï±À±o¨ìµ{¦¡½X, «¢ :L ¦ý¬On¥ý·|¼g¤½¦¡!
ÁÂÁÂ
Sub test_20200807_9()
[A1] = "=TEXT(NOW(), ""¤µ¤Ñ¬Oaaaa_yyyy\_mm\_dddd\_¤W¤È/¤U¤È\_hh\_mm\_ss"")"
MsgBox [A1]
[B2] = "¤µ¤Ñ¬O"
[A1] = "=TEXT(NOW(), R[1]C[1]&""aaaa_yyyy\_mm\_dddd\_¤W¤È/¤U¤È\_hh\_mm\_ss"")"
MsgBox [A1]
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|