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

[µo°Ý] "°ïÅ|ªÅ¶¡¤£¨¬"°ÝÃD½Ð±Ð

[µo°Ý] "°ïÅ|ªÅ¶¡¤£¨¬"°ÝÃD½Ð±Ð

DEAR  SIR
°õ¦æ¦p¤U ¥X²{ "°ïÅ|ªÅ¶¡¤£¨¬" ???
·Ð¤£§[½ç±Ð   THANKS    ROBERT  05/05

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  ÀɮצWºÙ
  AA
End Sub

Sub AA()
X = Sheet51.Range("AA1")
Y = Sheet51.Range("AA2")
If X <> Y Then
Application.CutCopyMode = False
    ChDir "C:\"
    ActiveWorkbook.SaveAs Filename:= _
        "C:\ " & Sheet51.Range("AA1") & ".xls", FileFormat:=xlNormal, _
        Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
        CreateBackup:=False
End If

End Sub

Sub ÀɮצWºÙ()
  Dim myWB As Workbook
  Dim I As Long
  Dim MYBASENAME As String
  Set myWB = Workbooks(1)
  MYBASENAME = myWB.Name
  I = InStrRev(MYBASENAME, ".")
  If I > 0 Then MYBASENAME = Left(MYBASENAME, I - 1)
  M = MYBASENAME
  Sheet51.Range("AA2") = M
  Set myWB = Nothing
End Sub
ù

¥»©«³Ì«á¥Ñ luhpro ©ó 2015-5-5 22:39 ½s¿è
DEAR  SIR
°õ¦æ¦p¤U ¥X²{ "°ïÅ|ªÅ¶¡¤£¨¬" ???
·Ð¤£§[½ç±Ð   THANKS    ROBERT  05/05
Private Sub W ...
rouber590324 µoªí©ó 2015-5-5 16:04

¨º¬O¦]¬°¤u§@ªíÅܧó¨Æ¥ó¤@ª½³QIJµo,
¦ÛµM«Ü§Ö´NOver Flow¤F.
³oÃþ±¡§Î¥i¥H¥Î³æ¨B°õ¦æ¨Óµo²{°ÝÃDÂI:
1. ¥ý¹ï ÀɮצWºÙ ³o¤@¦æ³]¤¤Â_ÂI.
2. Åܧ󦹤u§@ªíªº¤º®eIJµo¦¹µ{§Ç.
3. ¨Ì¦¸«ö F8 «öÁäÆ[¹îµ{¦¡°õ¦æ¨BÆJ.
§A·|µo²{µ{¦¡¬O³o¼Ë¶]ªº-
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  ÀɮצWºÙ
Sub ÀɮצWºÙ()
...
  Sheet51.Range("AA2") = M
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
...
(µL­­°j°é)


¸Ñ¨Mªº¤èªk¬O¦b¤£À³Ä²µo SheetChange µ{§Ç®É´N¤£­nIJµo:
  1. Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  2.   Application.EnableEvents = False
  3.     ÀɮצWºÙ
  4.   AA
  5.   Application.EnableEvents = True
  6. End Sub
½Æ»s¥N½X

TOP

DEAR luhpro ¤j¤j
¯u¬O¨ü¯q¨}¦h  ¤p§ÌÁA¸Ñ­ù    THANKS*10000
ù

TOP

        ÀR«ä¦Û¦b : µoµÊ®ð¬Oµu¼ÈªºµoºÆ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD