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

[µo°Ý] ¦Û­q®æ¦¡

[µo°Ý] ¦Û­q®æ¦¡

¦p¹Ï¸ÑÄÀ
°²¦p·s¼W¤@­Óuserform1.show
¼W³]¤@­Ótextbox1
¦p¦ó¦btextbox1¤ÎRange("A1")Åã¥Ü¦Û­q®æ¦¡©O

¦Û­q®æ¦¡Å㦡¤èªk.JPG (62.97 KB)

¦Û­q®æ¦¡Å㦡¤èªk.JPG

¦^´_ 4# GBKEE


    ÁÂÁÂg¤jª©ªºªº¸ÑÄÀ..·PÁÂ

TOP

¦^´_ 3# sillykin
  1. Replace ¨ç¼Æ
  2. ¶Ç¦^¤@­Ó¦r¦ê¡A¸Ó¦r¦ê¤¤«ü©wªº¤l¦r¦ê¤w³Q¨ú¥N¦¨¥t¤@¤l¦r¦ê¡A¨Ã¥B¨ú¥Nµo¥Íªº¦¸¼Æ¤]¬O«ü©wªº¡C

  3. Len ¨ç¼Æ
  4. ¶Ç¦^¤@Long¡A¬°¦r¦ê¤º¦r¤¸ªº¼Æ¥Ø¡A©Î¬O¶Ç¦^Àx¦s¤@ÅܼƩһݪº¦ì¤¸²Õ¼Æ¡C
½Æ»s¥N½X
Len(Replace(TextBox1, " ", "")) ->  ¦r¤¸(¨ú¥N " " ¬°ªÅ®æ)«áªº¦ì¤¸²Õ¼Æ
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ÁÂÁÂg¤jª©¥Dªº¦^ÂÐ..
½Ð°Ýª©¥DFor I = 1 To Len(Replace(TextBox1, " ", ""))
³o¤@¦æ¦³ÂI¤£¤ÓÀ´???

TOP

¦^´_ 1# sillykin
Â÷¶}TextBox1«áªº¨Æ¥óµ{¦¡½X
  1. Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
  2.     Dim S As String, I As Integer
  3.     For I = 1 To Len(Replace(TextBox1, " ", ""))
  4.         S = S & " 0"
  5.     Next
  6.     TextBox1 = Format(Replace(TextBox1, " ", ""), S)
  7.     Range("A1").NumberFormatLocal = S
  8.     Range("A1") = Replace(TextBox1, " ", "")
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD