LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JK JK is offline
external usenet poster
 
Posts: 78
Default What's wrong with my procedure to show tabs?

In an attempt to mimic Print Preview, when some of my worksheets are
activated they display a limited toobar and hide the tabs. This works.

When they are deactivated, they restore the toolbar and show the tabs.
However, sometimes (not always) they don't show the tabs. Which is remedied
only by activating the worksheet again then deactivating it again.

Here's my procedure

Sub ClosePreview()

Application.ScreenUpdating = False

With ActiveSheet

.Unprotect "password"

.Visible = False

End With

Call ActivateRecordName 'RESTORES SHEET THAT WAS ACTIVE WHEN PREVIEW WAS
CALLED

Call MakeMenuBar3 'RESTORES PROGRAM'S TOOLBAR

Application.ScreenUpdating = True

ActiveWorkbook.Protect "password", Structu=True, Windows:=False

Call KeepTabs

End Sub



Sub KeepTabs()

'PREVENTS TABS FROM DISAPPEARING

On Error GoTo ResetEvents

Application.EnableEvents = False

ActiveWindow.DisplayWorkbookTabs = True

Application.EnableEvents = True

Exit Sub

ResetEvents:

Application.EnableEvents = True

End Sub


Can anyone see what I might be doing wrong? Thank you in advance.

Jim Kobzeff



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked cells show wrong number Guy Links and Linking in Excel 4 April 21st 23 08:07 PM
Why does the date show up wrong in Excel graphs? Norm Shea Excel Discussion (Misc queries) 0 March 19th 09 03:09 PM
how do I get tabs to show in 2 or more rows? Drew[_2_] Excel Discussion (Misc queries) 4 April 2nd 08 11:14 PM
Help file show tabs Ron Excel Discussion (Misc queries) 0 August 30th 05 02:50 PM
my tabs are hidden and can't make them show Wendy Excel Discussion (Misc queries) 2 July 19th 05 06:37 PM


All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"