PC Review


Reply
Thread Tools Rate Thread

Change Excel Title Bar/Caption

 
 
=?Utf-8?B?QUo=?=
Guest
Posts: n/a
 
      3rd Oct 2007
Hello
How can I change the title "Microsoft Excel - File Name.xls" to custom title
when I launch a particular work book. This change should occur only if I
launch this work book. If I launch any other excel work book then the normal
should occur i.e. "Microsoft Excel - File Name.xls"

Thanks in advance for your help.

BR
 
Reply With Quote
 
 
 
 
Roger Whitehead
Guest
Posts: n/a
 
      3rd Oct 2007
Application.Caption = "This is my caption"

---
HTH
Roger
Shaftesbury (UK)



"AJ" <(E-Mail Removed)> wrote in message
news:0024E907-CCFC-4C1D-AAC0-(E-Mail Removed)...
> Hello
> How can I change the title "Microsoft Excel - File Name.xls" to custom
> title
> when I launch a particular work book. This change should occur only if I
> launch this work book. If I launch any other excel work book then the
> normal
> should occur i.e. "Microsoft Excel - File Name.xls"
>
> Thanks in advance for your help.
>
> BR



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      3rd Oct 2007
Private Sub Workbook_Activate()
Application.Caption = "my custom title"
End Sub

Private Sub Workbook_Deactivate()
Application.Caption = Empty
End Sub

Private Sub Workbook_Open()
Application.Caption = "my custom title"
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"AJ" <(E-Mail Removed)> wrote in message
news:0024E907-CCFC-4C1D-AAC0-(E-Mail Removed)...
> Hello
> How can I change the title "Microsoft Excel - File Name.xls" to custom
> title
> when I launch a particular work book. This change should occur only if I
> launch this work book. If I launch any other excel work book then the
> normal
> should occur i.e. "Microsoft Excel - File Name.xls"
>
> Thanks in advance for your help.
>
> BR



 
Reply With Quote
 
=?Utf-8?B?QUo=?=
Guest
Posts: n/a
 
      3rd Oct 2007
Bob Thanks for code, it worked partially.
I still get the File name.xls How can I remove the file name?
Is it possible to remove the Excel Symbol/icon image?

I hope I am not asking for too much.


"Bob Phillips" wrote:

> Private Sub Workbook_Activate()
> Application.Caption = "my custom title"
> End Sub
>
> Private Sub Workbook_Deactivate()
> Application.Caption = Empty
> End Sub
>
> Private Sub Workbook_Open()
> Application.Caption = "my custom title"
> End Sub
>
> 'This is workbook event code.
> 'To input this code, right click on the Excel icon on the worksheet
> '(or next to the File menu if you maximise your workbooks),
> 'select View Code from the menu, and paste the code
>
>
> --
> ---
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
>
>
>
> "AJ" <(E-Mail Removed)> wrote in message
> news:0024E907-CCFC-4C1D-AAC0-(E-Mail Removed)...
> > Hello
> > How can I change the title "Microsoft Excel - File Name.xls" to custom
> > title
> > when I launch a particular work book. This change should occur only if I
> > launch this work book. If I launch any other excel work book then the
> > normal
> > should occur i.e. "Microsoft Excel - File Name.xls"
> >
> > Thanks in advance for your help.
> >
> > BR

>
>
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      3rd Oct 2007
Do you mean you get the filename on the customised workbook?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"AJ" <(E-Mail Removed)> wrote in message
news54F8461-6EBE-4173-B4C7-(E-Mail Removed)...
> Bob Thanks for code, it worked partially.
> I still get the File name.xls How can I remove the file name?
> Is it possible to remove the Excel Symbol/icon image?
>
> I hope I am not asking for too much.
>
>
> "Bob Phillips" wrote:
>
>> Private Sub Workbook_Activate()
>> Application.Caption = "my custom title"
>> End Sub
>>
>> Private Sub Workbook_Deactivate()
>> Application.Caption = Empty
>> End Sub
>>
>> Private Sub Workbook_Open()
>> Application.Caption = "my custom title"
>> End Sub
>>
>> 'This is workbook event code.
>> 'To input this code, right click on the Excel icon on the worksheet
>> '(or next to the File menu if you maximise your workbooks),
>> 'select View Code from the menu, and paste the code
>>
>>
>> --
>> ---
>> HTH
>>
>> Bob
>>
>> (there's no email, no snail mail, but somewhere should be gmail in my
>> addy)
>>
>>
>>
>> "AJ" <(E-Mail Removed)> wrote in message
>> news:0024E907-CCFC-4C1D-AAC0-(E-Mail Removed)...
>> > Hello
>> > How can I change the title "Microsoft Excel - File Name.xls" to custom
>> > title
>> > when I launch a particular work book. This change should occur only if
>> > I
>> > launch this work book. If I launch any other excel work book then the
>> > normal
>> > should occur i.e. "Microsoft Excel - File Name.xls"
>> >
>> > Thanks in advance for your help.
>> >
>> > BR

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QUo=?=
Guest
Posts: n/a
 
      3rd Oct 2007
Yes Bob, I get the file name.xls along with "my custom name" instead of
Microsoft Excel.
So maybe I am not clear in what I want. Therefore a quick recap.
The Microsoft Excel is removed but the file name still appears after "my
custom name"
Thanks in advance if it can be solved.

"Bob Phillips" wrote:

> Do you mean you get the filename on the customised workbook?
>
> --
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
>
> "AJ" <(E-Mail Removed)> wrote in message
> news54F8461-6EBE-4173-B4C7-(E-Mail Removed)...
> > Bob Thanks for code, it worked partially.
> > I still get the File name.xls How can I remove the file name?
> > Is it possible to remove the Excel Symbol/icon image?
> >
> > I hope I am not asking for too much.
> >
> >
> > "Bob Phillips" wrote:
> >
> >> Private Sub Workbook_Activate()
> >> Application.Caption = "my custom title"
> >> End Sub
> >>
> >> Private Sub Workbook_Deactivate()
> >> Application.Caption = Empty
> >> End Sub
> >>
> >> Private Sub Workbook_Open()
> >> Application.Caption = "my custom title"
> >> End Sub
> >>
> >> 'This is workbook event code.
> >> 'To input this code, right click on the Excel icon on the worksheet
> >> '(or next to the File menu if you maximise your workbooks),
> >> 'select View Code from the menu, and paste the code
> >>
> >>
> >> --
> >> ---
> >> HTH
> >>
> >> Bob
> >>
> >> (there's no email, no snail mail, but somewhere should be gmail in my
> >> addy)
> >>
> >>
> >>
> >> "AJ" <(E-Mail Removed)> wrote in message
> >> news:0024E907-CCFC-4C1D-AAC0-(E-Mail Removed)...
> >> > Hello
> >> > How can I change the title "Microsoft Excel - File Name.xls" to custom
> >> > title
> >> > when I launch a particular work book. This change should occur only if
> >> > I
> >> > launch this work book. If I launch any other excel work book then the
> >> > normal
> >> > should occur i.e. "Microsoft Excel - File Name.xls"
> >> >
> >> > Thanks in advance for your help.
> >> >
> >> > BR
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      3rd Oct 2007
I don't get that. You do mean that you get say

WorkbookName.xls - my custom title

in the application bar.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"AJ" <(E-Mail Removed)> wrote in message
news:623BC94D-1046-4832-8F07-(E-Mail Removed)...
> Yes Bob, I get the file name.xls along with "my custom name" instead of
> Microsoft Excel.
> So maybe I am not clear in what I want. Therefore a quick recap.
> The Microsoft Excel is removed but the file name still appears after "my
> custom name"
> Thanks in advance if it can be solved.
>
> "Bob Phillips" wrote:
>
>> Do you mean you get the filename on the customised workbook?
>>
>> --
>> HTH
>>
>> Bob
>>
>> (there's no email, no snail mail, but somewhere should be gmail in my
>> addy)
>>
>> "AJ" <(E-Mail Removed)> wrote in message
>> news54F8461-6EBE-4173-B4C7-(E-Mail Removed)...
>> > Bob Thanks for code, it worked partially.
>> > I still get the File name.xls How can I remove the file name?
>> > Is it possible to remove the Excel Symbol/icon image?
>> >
>> > I hope I am not asking for too much.
>> >
>> >
>> > "Bob Phillips" wrote:
>> >
>> >> Private Sub Workbook_Activate()
>> >> Application.Caption = "my custom title"
>> >> End Sub
>> >>
>> >> Private Sub Workbook_Deactivate()
>> >> Application.Caption = Empty
>> >> End Sub
>> >>
>> >> Private Sub Workbook_Open()
>> >> Application.Caption = "my custom title"
>> >> End Sub
>> >>
>> >> 'This is workbook event code.
>> >> 'To input this code, right click on the Excel icon on the worksheet
>> >> '(or next to the File menu if you maximise your workbooks),
>> >> 'select View Code from the menu, and paste the code
>> >>
>> >>
>> >> --
>> >> ---
>> >> HTH
>> >>
>> >> Bob
>> >>
>> >> (there's no email, no snail mail, but somewhere should be gmail in my
>> >> addy)
>> >>
>> >>
>> >>
>> >> "AJ" <(E-Mail Removed)> wrote in message
>> >> news:0024E907-CCFC-4C1D-AAC0-(E-Mail Removed)...
>> >> > Hello
>> >> > How can I change the title "Microsoft Excel - File Name.xls" to
>> >> > custom
>> >> > title
>> >> > when I launch a particular work book. This change should occur only
>> >> > if
>> >> > I
>> >> > launch this work book. If I launch any other excel work book then
>> >> > the
>> >> > normal
>> >> > should occur i.e. "Microsoft Excel - File Name.xls"
>> >> >
>> >> > Thanks in advance for your help.
>> >> >
>> >> > BR
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      3rd Oct 2007
No, it's

my custom title - WorkbookName.xls

I think that's just how Excel works. The "caption" you can change is only
the first part of the entire caption, which also includes the file name. If
you don't maximize the open workbook, then the workbook name does not
appear.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Bob Phillips" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I don't get that. You do mean that you get say
>
> WorkbookName.xls - my custom title
>
> in the application bar.
>
> --
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my
> addy)
>
> "AJ" <(E-Mail Removed)> wrote in message
> news:623BC94D-1046-4832-8F07-(E-Mail Removed)...
>> Yes Bob, I get the file name.xls along with "my custom name" instead of
>> Microsoft Excel.
>> So maybe I am not clear in what I want. Therefore a quick recap.
>> The Microsoft Excel is removed but the file name still appears after "my
>> custom name"
>> Thanks in advance if it can be solved.
>>
>> "Bob Phillips" wrote:
>>
>>> Do you mean you get the filename on the customised workbook?
>>>
>>> --
>>> HTH
>>>
>>> Bob
>>>
>>> (there's no email, no snail mail, but somewhere should be gmail in my
>>> addy)
>>>
>>> "AJ" <(E-Mail Removed)> wrote in message
>>> news54F8461-6EBE-4173-B4C7-(E-Mail Removed)...
>>> > Bob Thanks for code, it worked partially.
>>> > I still get the File name.xls How can I remove the file name?
>>> > Is it possible to remove the Excel Symbol/icon image?
>>> >
>>> > I hope I am not asking for too much.
>>> >
>>> >
>>> > "Bob Phillips" wrote:
>>> >
>>> >> Private Sub Workbook_Activate()
>>> >> Application.Caption = "my custom title"
>>> >> End Sub
>>> >>
>>> >> Private Sub Workbook_Deactivate()
>>> >> Application.Caption = Empty
>>> >> End Sub
>>> >>
>>> >> Private Sub Workbook_Open()
>>> >> Application.Caption = "my custom title"
>>> >> End Sub
>>> >>
>>> >> 'This is workbook event code.
>>> >> 'To input this code, right click on the Excel icon on the worksheet
>>> >> '(or next to the File menu if you maximise your workbooks),
>>> >> 'select View Code from the menu, and paste the code
>>> >>
>>> >>
>>> >> --
>>> >> ---
>>> >> HTH
>>> >>
>>> >> Bob
>>> >>
>>> >> (there's no email, no snail mail, but somewhere should be gmail in my
>>> >> addy)
>>> >>
>>> >>
>>> >>
>>> >> "AJ" <(E-Mail Removed)> wrote in message
>>> >> news:0024E907-CCFC-4C1D-AAC0-(E-Mail Removed)...
>>> >> > Hello
>>> >> > How can I change the title "Microsoft Excel - File Name.xls" to
>>> >> > custom
>>> >> > title
>>> >> > when I launch a particular work book. This change should occur
>>> >> > only if
>>> >> > I
>>> >> > launch this work book. If I launch any other excel work book then
>>> >> > the
>>> >> > normal
>>> >> > should occur i.e. "Microsoft Excel - File Name.xls"
>>> >> >
>>> >> > Thanks in advance for your help.
>>> >> >
>>> >> > BR
>>> >>
>>> >>
>>> >>
>>>
>>>
>>>

>
>



 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      3rd Oct 2007
Option Explicit
Private Declare Function FindWindow _
Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function SetWindowText _
Lib "user32" Alias "SetWindowTextA" _
(ByVal hwnd As Long, _
ByVal lpString As String) As Long

Sub AlterExcelCaption(strCaption As String)
SetWindowText FindWindow("XLMAIN", Application.Caption), strCaption
End Sub

Sub test()
AlterExcelCaption "Just testing"
End Sub


RBS


"AJ" <(E-Mail Removed)> wrote in message
news:0024E907-CCFC-4C1D-AAC0-(E-Mail Removed)...
> Hello
> How can I change the title "Microsoft Excel - File Name.xls" to custom
> title
> when I launch a particular work book. This change should occur only if I
> launch this work book. If I launch any other excel work book then the
> normal
> should occur i.e. "Microsoft Excel - File Name.xls"
>
> Thanks in advance for your help.
>
> BR


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Caption title is not appearing in caption table TFX Kurt Microsoft Word Document Management 1 4th Jan 2010 12:31 PM
Label in Excel... change caption from VB gonecrazybacksoon@gmail.com Microsoft Excel Programming 2 20th Apr 2006 01:41 AM
Title Bar Caption in Excel Cory Humby Microsoft Excel Misc 4 10th Sep 2004 08:12 PM
Title Bar Caption in Excel Cory Microsoft Excel Misc 0 10th Sep 2004 07:54 PM
VBA to change excel caption picture ironmouse Microsoft Excel Programming 0 4th May 2004 09:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:25 PM.