Splash Screen Questions

mhenk

Well-known Member
Joined
Jun 13, 2005
Messages
591
Hey folks!

I'm adding a userform Splash screen to my project, listing some qualifications & limitations. I can get the form to show up, my 3 questions are:

1) is there a way to load a formatted text file into a control? I'd like to Have this model be totally independant of other files, so if there's a format-able lable or text box that I'm not seeing, that'd be the best bet.

2) how do I enable a button 10 seconds after the form loads?

3) how do I disable (or reprogram) the small "X" at the top corner? ideally, it'd be disabled.

Thanks!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
1) is there a way to load a formatted text file into a control? I'd like to Have this model be totally independant of other files, so if there's a format-able lable or text box that I'm not seeing, that'd be the best bet.
Formatted as what? RTF? Spacings? Post an example or explain yourself more thoroughly

4) Is there a way to skip a "Before Close" event?
Workbook_BeforeClose ? What do you mean by "skip"? I don't understand. If you do not want code to run in this event, don't put any in there...

Need more details... :)
 
Upvote 0
1) formatted with some bold text, some text with a larger font size, basically a word document.

4) I need the code to run in some instances, but not in others. Specifically, if the user declines the qualifications and limitations on this splash screen, the before_close should NOT fire. in other situations, it should.
 
Upvote 0
1 I do not know what development tools are available to you. The RichTextBox control is one option. If the message you are displaying is static or only varies in part, take a screen shot and load it into an image control.

4 was pretty much handled in the link provided by Vog II. Read up on the Query_Close event.

4) I need the code to run in some instances, but not in others. Specifically, if the user declines the qualifications and limitations on this splash screen, the before_close should NOT fire. in other situations, it should.

There are a 101 ways you might implement logic to accomplish this. I can't help you unless you give me more to go on.
 
Upvote 0
For 1, the text is somewhat long, so I was thinking that a scrolling text box (RichTextBox, how do I get this?) was the best bet.

For 4:

The splash screen allows the user to accept the terms of the model, or decline it. In the event that the user clicks the Decline Button, I want the file to close, without running the BeforeClose event. In all other situations, i want the beforeclose event to run.
 
Upvote 0
And I'm still having problems with number 2. for some reason, I can't figure out how to work Application.Ontime
 
Upvote 0
FWIW, here is the code behind the userform:

Code:
Private Sub Accept_Click()
'user clicks "Accept", lets them into the model

Me.Hide
End Sub

Private Sub Decline_Click()
'User Clicks decline, closes out the file

'Need code to prevent the before close event from firing when this button is clicked

'Pass a boolean variable??

'Temporarily disabled so I can access the file w/Macros Enabled

'ActiveWorkbook.Saved = True
'ActiveWorkbook.Close

Me.Hide

End Sub


Public Sub UserForm_Activate()
qual_limit.Caption = ActiveWorkbook.FullName

'After a certain amount of time, activate the accept button
'NOT WORKING

Application.OnTime Now + TimeValue("00:00:01"), "qual_limit.enablebutton"


End Sub

Sub enablebutton()
Accept.Enabled = True
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'Disables the "X" button
    If CloseMode = vbFormControlMenu Then
        MsgBox "Please Accept or Decline the Qualifications & Limitations"
        Cancel = True
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,328
Messages
6,124,295
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top