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

[¤w¸Ñ¨M]½Ð±Ð¦p¦ó§P§OÀɮ׬O§_¶}±Ò?

[¤w¸Ñ¨M]½Ð±Ð¦p¦ó§P§OÀɮ׬O§_¶}±Ò?

¥»©«³Ì«á¥Ñ loyyee ©ó 2011-12-14 00:06 ½s¿è

½Ð°Ý¦p¦ó¦b"BOOK1"ÀÉ®×¥¨¶°°õ¦æ®É¡A§P§O¦¹¥x¹q¸£¤¤"BOOK2"Àɮ׬O§_¤]¶}±Ò¤¤¡A
"BOOK2"Àɮ׶}±Ò®É¡÷¦Û°ÊÃö³¬"BOOK2"Àɮפ£¦sÀÉ¡C
"BOOK2"ÀÉ®×¥¼¶}±Ò®É¡÷°õ¦æ"BOOK1"ÀɮפU¤@¬q¥¨¶°¡C
Book1.rar (5.28 KB)

Sub xxx()
    Dim myFNo      As Long
    Dim myFileName As String
    Dim myErr      As Long
    myFileName = "c:\BOOK2.xls"
    If myFileName = "False" Then Exit Sub
    myFNo = FreeFile
    On Error Resume Next
    Open myFileName For Binary Access Write Lock Write As #myFNo
    Close #myFNo
    myErr = Err.Number
    On Error GoTo 0
    If myErr > 0 Then
       Workbooks("BOOK2.xls").Close
    End If
    '...
    '...
End Sub

TOP

¦^´_ 2# wang

¦n¹³¤£¦æ¥Î¡A¥i¯à§Ú¨S»¡²M·¡¡A§Ú¬O­n§âµøµ¡¤¤"BOOK2"ÀÉ®×Ãö³¬¡A
¯d¤U"BOOK1"ÀÉ®×´N¦n¡C

TOP

¦^´_ 3# loyyee
  1. Sub nn()
  2. Dim w As Window
  3. For Each w In Windows
  4. If w.Caption = "Book2.xls" Then w.Close 0  '¦pªG§ä¨ìµøµ¡¼ÐÃD´N¤£Àx¦sÃö³¬
  5. Next
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh

¥i¥H¥Î¤F¡A·PÁÂHsieh¡Bwang«ü¾É¡C

TOP

        ÀR«ä¦Û¦b : ®É®É¦n¤ß´N¬O®É®É¦n¤é¡C
ªð¦^¦Cªí ¤W¤@¥DÃD