ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Splash Screen (https://www.excelbanter.com/excel-programming/284036-splash-screen.html)

Lee

Splash Screen
 
I've copied the code I'm using to stop a splash screen
from running if a specific workbook is open. I have a
template set up that users can open up, make changes, and
save to a new file name. I would like the splash screen
to open only the first time the template is opened. The
tab names are identical and cannot be changed in any of
the files. Is there a way to prevent the splash screen
from running if any instance of Excel is open. Is there a
way to look for a specific tab in all instances of Excel
and somehow use this to stop the splash screen from
running?

Public Const NameWkbook As String = "BOEUpload_Macro.xls"

Private Function IsWkbookOpen(NameWkbook) As Boolean
'determines if Boe Upload Macro file is open
Dim x As Workbook
On Error Resume Next
Set x = Workbooks(NameWkbook)
If Err = 0 Then IsWkbookOpen = True _
Else: IsWkbookIsOpen = False
End Function

Sub CheckIt()
'Run Splash Screen
If IsWkbookOpen(NameWkbook) = False Then SplashScrFrm.Show
End Sub

Thanks for the help.

Lee


All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com