Hi, Remotruker,
maybe like this:
Sub TestForOtherWorkbook()
Dim wb As Workbook
Dim wbOther As Workbook
If Workbooks.Count > 1 Then
For Each wb In Workbooks
If wb.Name <> "PERSONALÖ.XLSB" Then
Set wbOther = wb
Exit For
End If
Next wb
End If
If Not wbOther Is Nothing Then
MsgBox "Name of the other workbook is: " & wbOther.Name
End If
Set wbOther = Nothing
End Sub
Or even simpler as the personal workbook should be insvisible: use ActiveWorkbook instead of ThisWorkbook (which holds the code).
Ciao,
Holger
Bookmarks