Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Splash Screen Timing


Dear Sir,

I am preparing VBA program and I made a procedure for the Splash
Screen when Excel Loads.

Pls find below my procedure for the Userform of Splash Screen.


'=======================================
Option Explicit

Private Sub UserForm_Click()
Unload Me
End Sub

Private Sub UserForm_Activate()

Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False

Dim dTime As Date
Dim i As Integer
For i = 1 To 100 Step 100 / 12
dTime = Now + TimeValue("0:00:01")
Application.Wait TimeValue(dTime)
ProgressBar1.Value = i
Next i

End Sub

Private Sub Userform_Initialize()

Label3.Caption = Format(Now, "dddd d mmmm yyyy hh:mm:ss")
HideTitleBar Me

End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)

If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox Prompt:=" Sorry but I can't let you do that. "
End If
End Sub

'==========================================

My problem is this I want to reduce the time for it, currently it
displays for 12 seconds, but I want to display this splash screen only
for 5 seconds and then close.

Pls tell me how to reduce the time to 5 seconds.

Waiting for your response.

Regards.

Syed Shahzad Zafar
Madinah
KSA.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Splash Screen Timing

Try this instead,
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub UserForm_Activate()
DoEvents
Sleep 5000
Unload Me
End Sub
Place the above in you userform module. Your splash screen will stay visable
for 5 sec note, you will have to trigger the userform in an event i.e
Workbook_open() or what ever.





"Shazi" wrote:


Dear Sir,

I am preparing VBA program and I made a procedure for the Splash
Screen when Excel Loads.

Pls find below my procedure for the Userform of Splash Screen.


'=======================================
Option Explicit

Private Sub UserForm_Click()
Unload Me
End Sub

Private Sub UserForm_Activate()

Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False

Dim dTime As Date
Dim i As Integer
For i = 1 To 100 Step 100 / 12
dTime = Now + TimeValue("0:00:01")
Application.Wait TimeValue(dTime)
ProgressBar1.Value = i
Next i

End Sub

Private Sub Userform_Initialize()

Label3.Caption = Format(Now, "dddd d mmmm yyyy hh:mm:ss")
HideTitleBar Me

End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)

If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox Prompt:=" Sorry but I can't let you do that. "
End If
End Sub

'==========================================

My problem is this I want to reduce the time for it, currently it
displays for 12 seconds, but I want to display this splash screen only
for 5 seconds and then close.

Pls tell me how to reduce the time to 5 seconds.

Waiting for your response.

Regards.

Syed Shahzad Zafar
Madinah
KSA.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Splash Screen Timing

On Jun 18, 3:18*pm, Office_Novice
wrote:
Try this instead,
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub UserForm_Activate()
* * *DoEvents
* * *Sleep 5000
* * *Unload Me
End Sub
Place the above in you userform module. Your splash screen will stay visable
for 5 sec note, you will have to trigger the userform in an event i.e
Workbook_open() or what ever.



"Shazi" wrote:

Dear Sir,


I am preparing VBA program and I made a procedure for the Splash
Screen when Excel Loads.


Pls find below my procedure for the Userform of Splash Screen.


'=======================================
Option Explicit


Private Sub UserForm_Click()
* * Unload Me
End Sub


Private Sub UserForm_Activate()


* * Application.DisplayFullScreen = True
* * Application.CommandBars("Worksheet Menu Bar").Enabled = False


* * Dim dTime As Date
* * Dim i As Integer
* * For i = 1 To 100 Step 100 / 12
* * dTime = Now + TimeValue("0:00:01")
* * Application.Wait TimeValue(dTime)
* * ProgressBar1.Value = i
* * Next i


End Sub


Private Sub Userform_Initialize()


* * Label3.Caption = Format(Now, "dddd d mmmm yyyy hh:mm:ss")
* * HideTitleBar Me


End Sub


Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)


* * If CloseMode = vbFormControlMenu Then
* * Cancel = True
* * MsgBox Prompt:=" Sorry but I can't let you do that. "
* * End If
End Sub


'==========================================


My problem is this I want to reduce the time for it, currently it
displays for 12 seconds, but I want to display this splash screen only
for 5 seconds and then close.


Pls tell me how to reduce the time to 5 seconds.


Waiting for your response.


Regards.


Syed Shahzad Zafar
Madinah
KSA.- Hide quoted text -


- Show quoted text -




Hi,

I tried your procedure, but my Progress Bar in the UserForm is not
working. it is stoped at all.

How to control ProgressBar to 5 seconds.

Regards

Shahzad
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Splash Screen Timing

change the 12 to a 5

Dim dTime As Date
Dim i As Integer
For i = 1 To 100 Step 100 / 5 '<-this number sets the approx number of
seconds
dTime = Now + TimeValue("0:00:01")
Application.Wait TimeValue(dTime)
ProgressBar1.Value = i
Next i

Paul D

"Shazi" wrote in message
...
:
: Dear Sir,
:
: I am preparing VBA program and I made a procedure for the Splash
: Screen when Excel Loads.
:
: Pls find below my procedure for the Userform of Splash Screen.
:
:
: '=======================================
: Option Explicit
:
: Private Sub UserForm_Click()
: Unload Me
: End Sub
:
: Private Sub UserForm_Activate()
:
: Application.DisplayFullScreen = True
: Application.CommandBars("Worksheet Menu Bar").Enabled = False
:
: Dim dTime As Date
: Dim i As Integer
: For i = 1 To 100 Step 100 / 12
: dTime = Now + TimeValue("0:00:01")
: Application.Wait TimeValue(dTime)
: ProgressBar1.Value = i
: Next i
:
: End Sub
:
: Private Sub Userform_Initialize()
:
: Label3.Caption = Format(Now, "dddd d mmmm yyyy hh:mm:ss")
: HideTitleBar Me
:
: End Sub
:
: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
: Integer)
:
: If CloseMode = vbFormControlMenu Then
: Cancel = True
: MsgBox Prompt:=" Sorry but I can't let you do that. "
: End If
: End Sub
:
: '==========================================
:
: My problem is this I want to reduce the time for it, currently it
: displays for 12 seconds, but I want to display this splash screen only
: for 5 seconds and then close.
:
: Pls tell me how to reduce the time to 5 seconds.
:
: Waiting for your response.
:
: Regards.
:
: Syed Shahzad Zafar
: Madinah
: KSA.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Splash Screen Timing

On Jun 18, 7:12*pm, "PaulD" <nospam wrote:
change the 12 to a 5

*Dim dTime As Date
* * Dim i As Integer
* * For i = 1 To 100 Step 100 / 5 '<-this number sets the approx number of
seconds
* * dTime = Now + TimeValue("0:00:01")
* * Application.Wait TimeValue(dTime)
* * ProgressBar1.Value = i
* * Next i

Paul D

"Shazi" wrote in message

...
:
: Dear Sir,
:
: I am preparing VBA program and I made a procedure for the Splash
: Screen when Excel Loads.
:
: Pls find below my procedure for the Userform of Splash Screen.
:
:
: '=======================================
: Option Explicit
:
: Private Sub UserForm_Click()
: * *Unload Me
: End Sub
:
: Private Sub UserForm_Activate()
:
: * *Application.DisplayFullScreen = True
: * *Application.CommandBars("Worksheet Menu Bar").Enabled = False
:
: * *Dim dTime As Date
: * *Dim i As Integer
: * *For i = 1 To 100 Step 100 / 12
: * *dTime = Now + TimeValue("0:00:01")
: * *Application.Wait TimeValue(dTime)
: * *ProgressBar1.Value = i
: * *Next i
:
: End Sub
:
: Private Sub Userform_Initialize()
:
: * *Label3.Caption = Format(Now, "dddd d mmmm yyyy hh:mm:ss")
: * *HideTitleBar Me
:
: End Sub
:
: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
: Integer)
:
: * *If CloseMode = vbFormControlMenu Then
: * *Cancel = True
: * *MsgBox Prompt:=" Sorry but I can't let you do that. "
: * *End If
: End Sub
:
: '==========================================
:
: My problem is this I want to reduce the time for it, currently it
: displays for 12 seconds, but I want to display this splash screen only
: for 5 seconds and then close.
:
: Pls tell me how to reduce the time to 5 seconds.
:
: Waiting for your response.
:
: Regards.
:
: Syed Shahzad Zafar
: Madinah
: KSA.



Hi,

I changed 12 to 5 seconds. now it is working excellent.

Thanks for your support.

Regards.

Shahzad


Reply
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
splash screen K11ngy Excel Discussion (Misc queries) 3 July 9th 07 12:19 PM
splash screen Dave F Excel Discussion (Misc queries) 2 March 16th 07 05:00 PM
Splash screen and various screen resolutions George J Excel Programming 4 October 3rd 04 10:15 PM
Splash Screen Lee Excel Programming 0 December 1st 03 05:08 PM
VBA splash screen scott[_6_] Excel Programming 2 October 16th 03 09:27 AM


All times are GMT +1. The time now is 09:39 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"