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

2­Óvba°ÝÃD

2­Óvba°ÝÃD

1. ¦³2­Óexcel   book1 & book2 ,¶}¤Fbook1 ¥Îvba¶}book2, ¦pªGtest
if book2¶}±Ò¤F then  end
end if

2. ¦p¦ó°µ·íoff excel®É   a1·|¦Û°Ê=1?

½Ð¤j¤jªùÀ°À°¦£.
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2010-9-24 19:44): ¦Û¤vÀ³¸Ó¥h¤F¸Ñµ{¦¡»yªk¡A½×¾Â«D¥[¤u¼t

¦^´_ 2# et5323


    ÁÂÁ¤j¤j
¥i§_§ï¦¨ book1¥H¶}®É
msgbox ½ÐÃöbook1
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

Function bWkOpen(sTargetWkName) As Boolean
    Dim xlWk As Workbook
    On Error Resume Next
    Err.Clear
    Set xlWk = Workbooks(sTargetWkName)
    If Err.Number = 0 Then
        bWkOpen = True
    Else
        bWkOpen = False
        Err.Clear
    End If
    Set xlWk = Nothing
End Function
Sub test()
    MsgBox bWkOpen("Book1.xls")
End Sub

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD