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

[µo°Ý] ½Ð°Ý¦p¦ó¨Ï¥Î VBA ¨Ó¸ü¤J¤@­ÓÀɮרæb¯S©wÀx¦s®æ¨q¥XŪ¤JªºÀɦW (¤£§t¸ô®|)

[µo°Ý] ½Ð°Ý¦p¦ó¨Ï¥Î VBA ¨Ó¸ü¤J¤@­ÓÀɮרæb¯S©wÀx¦s®æ¨q¥XŪ¤JªºÀɦW (¤£§t¸ô®|)

½Ð°Ý¦p¦ó¨Ï¥Î VBA ¨Ó¸ü¤J¤@­ÓÀɮרæb¯S©wÀx¦s®æ¨q¥XŪ¤JªºÀɦW (¤£§t¸ô®|)

1. °²³]Ū¤JªºÀɦW¬° C:\test\short.txt ¦ý¥u­n¦b Excel ªº C2 ¦ì¸m¨q¥X short

Thank you~

¹B¥Î¤@¤U³o´X­Ó¨ç¼Æ¡A´N¥i»´ÃP¹F¦¨³á~
InStr
InStrRev
Mid

MsgBox (Mid(Range("A1"), InStrRev(Range("A1"), "\") + 1, InStr(Mid(Range("A1"), InStrRev(Range("A1"), "\") + 1), ".") - 1))

A1=C:\test\short.txt
­Y¬O§Ú¦^µª¡A¨Ï±zº¡·N¡A½Ð±zÅý§Úª¾¹D¡I                  
­Y¬O§Úªº¦^ÂСA±z¤´¦³¨ä¥L¨£¸Ñ¡A¤]½Ð±z¤£¶Þ«ü±Ð¡I

TOP

ÁÂÁ±z, ½Ð°Ý¥i¥H¤£­n¦³Àɮ׸ô®|¶Ü?
A1=short.txt

TOP

¦^´_ 3# a_peter
¸Õ¸Õ¬Ý
  1. 'UBound ¨ç¼Æ¶Ç¦^ Long­È, ªí¥Ü«ü©w°}¦C¬Yºû³Ì¤j¥i¨Ï¥Îªº°}¦C¯Á¤Þ
  2. Option Explicit
  3. Sub Ex()
  4.     Dim a As String, s As Variant
  5.     a = "C:\test\short.txt"
  6.     s = Split(a, "\")
  7.     MsgBox s(UBound(s))
  8. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ÁÂÁ³o­Ó¥i¥H¤F~

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD