Jeffrey Mahoney
Well-known Member
- Joined
- May 31, 2015
- Messages
- 3,212
- Office Version
- 365
- Platform
- Windows
Ok, Excel has changed again. The snippet of a macro below has worked for years, even for workbooks that are in protected view. Now it doesn't see them at all. As soon as I click Enable Editing, the macro works.
I'm really hoping this isn't permanent.
Does anybody know of a workaround?
I'm really hoping this isn't permanent.
Does anybody know of a workaround?
VBA Code:
Sub FindWB()
Dim WB As Workbook
Dim v As Variant
For Each WB In Application.Workbooks
Debug.Print WB.Name
If InStr(WB.Name, "Cash Flow Export") > 0 Or InStr(WB.Name, "Header Report") > 0 Then
WB.Activate
Range("A4").Select
Set v = ActiveCell
Exit For
End If
Next WB
End Sub