ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Path name in title bar-READ ONLY prob (https://www.excelbanter.com/excel-programming/342748-path-name-title-bar-read-only-prob.html)

Deeds

Path name in title bar-READ ONLY prob
 
I have a tough one...I put the code
ActiveWindow.Caption = ActiveWorkbook.FullName
in a workbook......however, if the file comes up as "read-only" the (read
only) message is gone from the title bar.....it is very important that users
see that they are in a "read only" file....is there any way to get the full
path name & the read only message to appear in the title bar?
Thanks in advance!

Chip Pearson

Path name in title bar-READ ONLY prob
 
Try something like


Dim WB As Workbook
Set WB = ActiveWindow.Parent
If WB.ReadOnly = True Then
ActiveWindow.Caption = "My Text (read only)"
Else
ActiveWindow.Caption = "My Text"
End If



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Deeds" wrote in message
...
I have a tough one...I put the code
ActiveWindow.Caption = ActiveWorkbook.FullName
in a workbook......however, if the file comes up as "read-only"
the (read
only) message is gone from the title bar.....it is very
important that users
see that they are in a "read only" file....is there any way to
get the full
path name & the read only message to appear in the title bar?
Thanks in advance!




Deeds

Path name in title bar-READ ONLY prob
 
Very good! Thanks much!

"Chip Pearson" wrote:

Try something like


Dim WB As Workbook
Set WB = ActiveWindow.Parent
If WB.ReadOnly = True Then
ActiveWindow.Caption = "My Text (read only)"
Else
ActiveWindow.Caption = "My Text"
End If



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Deeds" wrote in message
...
I have a tough one...I put the code
ActiveWindow.Caption = ActiveWorkbook.FullName
in a workbook......however, if the file comes up as "read-only"
the (read
only) message is gone from the title bar.....it is very
important that users
see that they are in a "read only" file....is there any way to
get the full
path name & the read only message to appear in the title bar?
Thanks in advance!






All times are GMT +1. The time now is 03:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com