In my case, I work a lot with transferring data from current Excel Workbook to another Excel Workbook, and to be able to do that, of course I need to make sure whether the destination Workbook is already open or not.
The following excel vba function assigned to check whether a workbook we need is open or not.
Using Workbook name as an input parameter, the function will do a looping in Workbooks collection to check all opened Workbook name, if there is a Workbook with the same name with the Workbook that we looking for, then the function will return true, and false if otherwise.
Public Function CheckSourceAvailability(sWorkBook As String) _
As Boolean
Dim wb As Workbook, bResult As Boolean
bResult = False
For Each wb In Application.Workbooks
If InStr(LCase(wb.Name), LCase(sWorkBook)) > 0 Then
bResult = True
Exit For
End If
Next wb
CheckSourceAvailability = bResult
End Function
All information about opened Workbook was saved by Excel in a collection object called Workbooks, just like Worksheets collection used by Excel to save information about all the Worksheets available.
FIN.
Pingback: wholesale portable water ionizer
Pingback: make money online
Pingback: optimizepress review
Pingback: Post Discount Codes
Pingback: Chat
Pingback: Mickey Mouse Watch
Pingback: submit voucher code
Pingback: bowmel chrysler review
Pingback: Men and Divorce Tips You Will Need to Cope
Pingback: bad credit mobile phones
Pingback: bad credit mobile phones
Pingback: scary games
Pingback: sk?ad w?gla
Pingback: official link
Pingback: cna classes
Pingback: kwiaty
Pingback: Anonymous
Pingback: signup scrapebox list
Pingback: Jetta
Pingback: filter papers
Pingback: brisbane web design
Pingback: real estate investing information
Pingback: automobile injury lawyer
Pingback: serwis ploterów Pozna?
Pingback: Electric Airsoft Guns
Pingback: snow fence
Pingback: jewelry buyer
Pingback: kid picture
Pingback: Free IPad3
Pingback: holy oil
Pingback: next
Pingback: click
Pingback: first communion veils
Pingback: www
Pingback: next
Pingback: website
Pingback: cheap printing companies
Pingback: gogo games
Pingback: instant loans
Pingback: tv live
Pingback: servis char
Pingback: official site
Pingback: Red Wines
Pingback: private schools in mansfield tx
Pingback: best car buyer
Pingback: go there