Change the name of the title bar to the name of the worksheet.

D

dave

I am building a spread sheet for my network printers. I have created several
(approx 20) worksheets to represent each location that we have network
printers.
The spread sheet launches fine.. I can click each work sheet at the bottom
of the screen and the data shows up like i want it to,,, however,,, the top
title bar of each work sheet contains the file name ie..xxxxxxxx.xls.
My goal/desire is to have the name of the work sheet appear in the title
bar...
for instance,,, for instance... Currently, if I click on the 123 Main Steet
work sheet
the 123 Main Street work sheet appears,, but the title bar still shows the
sread sheet file name.. when I click on the 123 Main Street work sheet,, I
would like it to appear where the filename appears on the title bar for that
work sheet.
Is this something simple or am i going to have to get deep into the scripting?
thanks
 
B

Barb Reinhardt

Try putting this in the ThisWorkbook module. It should get you part of the
way.

Option Explicit

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Caption = ActiveSheet.Name

End Sub
 
B

Barb Reinhardt

Correction.


Option Explicit


Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Caption = Sh.Name

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top