Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
Application.Caption = "This is my caption"
--- HTH Roger Shaftesbury (UK) "AJ" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
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" wrote in message ... 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
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" wrote in message ... 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
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" wrote in message ... 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" wrote in message ... 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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
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" wrote in message ... 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" wrote in message ... 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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
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" wrote in message ... 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" wrote in message ... 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" wrote in message ... 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 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
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" wrote in message ... 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" wrote in message ... 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" wrote in message ... 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" wrote in message ... 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 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Excel Title Bar/Caption
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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change colour of Excel title bar | Excel Programming | |||
Label in Excel... change caption from VB | Excel Programming | |||
How do I change the size of Value Axis Title box for an Excel Cha. | Charts and Charting in Excel | |||
CommandButton caption title | Excel Programming | |||
VBA to change excel caption picture | Excel Programming |