![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
i like to use a splash form in a HIDDEN WORKBOOK, but it seems to be not working. Problem is that the frmErrorMsg keeps open after the 5 sec. delay, so there's no Unload event, because the "Close Form" routine isn't called. Is there a possibility to get this working in a HIDDEN WORKBOOK (Add- In)? Do i have to specify where the Close Form routine can be found? If so how to do so. I have following code, works as long as the workbook ISN'T hidden (IsAddin = False): Sub StartHere() 'import the common settings into sheet common settings Dim FullPath As String Dim Sep As String Dim SheetName As String Dim blfileExist As Boolean Dim blPathExist As Boolean blnDEBUG = True 'only needed for debugging strUnitDataLog = strUnit_DataLog & txtFileExtension 'unit data logging file name FullPath = ThisWorkbook.path 'test if path exist - server online 'if not found, keep on retrying blPathExist = FileOrDirExists(FullPath) While blPathExist = False strErrorMSG = "Directory " & vbCrLf & _ FullPath & vbCrLf & _ " niet gevonden!" & vbCrLf & vbCrLf & _ "Mogelijk is de server offline of niet verbonden." frmErrorMsg.cmdOK.Caption = "Retry" frmErrorMsg.cmdClose.Visible = False frmErrorMsg.Show 'test again if path exist - server online blPathExist = FileOrDirExists(FullPath) Wend 'test if file commonsettings.txt exist, if not show frmCommonSettings FullPath = ThisWorkbook.path & "\Common Settings" & txtFileExtension 'test if file exists 'if not show Common Settings form blPathExist = FileOrDirExists(FullPath) If blnDEBUG = True Then blPathExist = False If blPathExist = False Then strErrorMSG = "Gemeenschappelijk configuratie bestand niet gevonden. " & vbCrLf & vbCrLf & vbCrLf & "Een ogenblik geduld A.U.B." & _ vbCrLf & vbCrLf & "Configuratie formulier start binnen 5 sec." Application.OnTime Now + TimeValue("00:00:05"), Procedu="CloseForm", Schedule:=True blnSplash = True frmErrorMsg.Show frmCommonSettings.Show End If 'load common setting file if common settings file exist 'else bail out If blnErrorTrapped = False Then Sep = vbTab SheetName = "Common Settings" 'load common settings ImportTextFile FullPath, Sep, SheetName End If 'show main form frmMainMenu.Show End Sub Sub CloseForm() Unload frmErrorMsg 'remove everything from this form from memory and close form End Sub Any help welcome. Thanks in advance Ludo |
| Ads |
|
#2
|
|||
|
|||
|
Try specifying...
frmErrorMsg.Show vbModeless ...so your code continues to run while it displays. You could look at using OnTime() to unload it OR include that in frmMainMenu's 'Initialize' event instead of using a separate routine just to unload the splash screen. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
|
#3
|
|||
|
|||
|
Op vrijdag 25 mei 2012 01:00:24 UTC+2 schreef GS het volgende:
> Try specifying... > > frmErrorMsg.Show vbModeless > > ..so your code continues to run while it displays. > > You could look at using OnTime() to unload it OR include that in > frmMainMenu's 'Initialize' event instead of using a separate routine > just to unload the splash screen. > > -- > Garry > > Free usenet access at http://www.eternal-september.org > ClassicVB Users Regroup! > comp.lang.basic.visual.misc > microsoft.public.vb.general.discussion Thanks Garry, Will look into that possibility. I'm (at work) still on Office 2003 but will upgrade to Office 2010 within a few weeks from now. I'm holding my breath to make the change to Excel 2010. I tested only the needed code for the splash screen (in my initial) at home (Excel 2007 / Vista) and there did it work as expected when i set the IsAddin property to TRUE. Regards, ludo |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Splash Screen | Brooke | Excel Discussion (Misc queries) | 5 | March 25th 08 03:58 PM |
| Splash Screen | Bill[_30_] | Excel Programming | 2 | November 3rd 05 05:28 PM |
| Splash screen | Steve | Excel Programming | 6 | August 9th 05 04:53 PM |
| Splash screen and various screen resolutions | George J | Excel Programming | 4 | October 3rd 04 10:15 PM |
| Splash screen stops Solver add-in working | keepITcool | Excel Programming | 2 | July 23rd 04 09:50 AM |