Caption Confusion

Richie(UK)

MrExcel MVP
Joined
May 17, 2002
Messages
3,329
Hi all,

As most of you will know, its possible to put your own title in the blue bar at the top of the Excel window with the following code:

Application.Caption = "MyCaption"

However, the Excel filename then follows on after the caption. Is there anyway to stop this from happening?

Cheers, Richie
 
Go to visual basic editor (if you are on excel press Alt&F11). Then press control&G and type the code in the window that pops up then press enter.

RET79
 
Upvote 0
Hi Richie.
This will display the string you assign without any baggage..

Sub MsgOnly()
ActiveWindow.Caption = ""
Application.Caption = "Hello to all!"
End Sub

Output: Hello to all!

With no file or application name.

Tom
 
Upvote 0
Thought I'd piggy back my 'caption' question here. I'm trying to understand what caption means. I did a search on the text "activewindow.caption" and rec'd this thread as search result.

In reading the above posts, I am now of the opinion that "activewindow.caption" reads the bar at the top of the page (default color bule?) for the name of the active wiindow file name? Am I close?
 
Upvote 0
Thought I'd piggy back my 'caption' question here. I'm trying to understand what caption means. I did a search on the text "activewindow.caption" and rec'd this thread as a search result.

In reading the above posts, I am now of the opinion that "activewindow.caption" reads the bar at the top of the page (default color blue?) for the name of the active wiindow file name? Am I close?
 
Upvote 0
Thought I'd piggy back my 'caption' question here. I'm trying to understand what caption means. I did a search on the text "activewindow.caption" and rec'd this thread as a search result.

In reading the above posts, I am now of the opinion that "activewindow.caption" reads the bar at the top of the page (default color blue?) for the name of the active wiindow file name? Am I close?
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top