Tuesday, June 2, 2015

How to store All Opened Workbooks Names in an Array

VBA Macro to store All Opened Workbooks Names in an Array
Suppose we have 4 workbooks opened as follows :



Now you can store the Names of all these workbooks opened , using the below Macro :
Sub Opened_WB_Names()
Dim WB_Names() As String

WB_Count = Workbooks().Count

For X = 1 To WB_Count

ReDim Preserve WB_Names(X - 1)

WB_Names(X - 1) = Workbooks(X).Name

'MsgBox WB_Names(X - 1)

Next X
End Sub

Thanks,TAMATAM

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. If you wish, please share your genuine Feedback or comments only related to this Blog Posts. It is my humble request that, please do not post any Spam comments or Advertising kind of comments, which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose we have a sample Sales data, which is stored with Monthly Snapsh...

Popular Posts from this Blog