Forum Discussion
vtcs2424
Dec 07, 2024Copper Contributor
Saving... / Saved text in title bar
How to retrieve value from title bar if it has saving... Or saved using VBA in excel. I think that it is used to show if file is synced to SharePoint online or not....
Kidd_Ip
Dec 09, 2024MVP
Referring this:
- Access the Title Bar Text:
- You can use the Application.Caption property to get the text from the title bar.
- Check for Specific Text:
- Use VBA to check if the title bar contains "Saving..." or "Saved".
Here's a sample VBA code to achieve this:
Sub CheckTitleBarStatus()
Dim titleBarText As String
titleBarText = Application.Caption
If InStr(titleBarText, "Saving...") > 0 Then
MsgBox "The file is currently saving."
ElseIf InStr(titleBarText, "Saved") > 0 Then
MsgBox "The file is saved and synced."
Else
MsgBox "The file is not in a saving state."
End If
End Sub
Steps to Implement the Code:
- Press Alt + F11 to open the VBA editor.
- Insert a new module by clicking Insert > Module.
- Copy and paste the above code into the module.
- Run the CheckTitleBarStatus macro to check the title bar status.
- vtcs2424Dec 09, 2024Copper Contributor
Also, application.caption not showing saving... Or saved text, it only shows file name and excel