Well, I just did it
see code below.
you know, on a more sentimental note, i'm finishing up this internship on
tuesday of next week. i've been on these forums for almost the entire
summer, posting questions and learning from you gurus. it just somehow seems
like a good ending for me to one up the infamous Rod Gill and achieve that
which isn't possible. On this high note, thank you to all you VBAs out there
who have put up with my questions. I have you to thank for so much. Keep up
the great work. Maybe I'll be back some day.
thanks
scott
first this code runs:
Sub StartUp()
frmLeaveOpen.Show
End Sub
then this is the code for the frmLeaveOpen:
Option Explicit
Private Sub Nobtn_Click()
Dim stayopen As Integer
stayopen = 0
frmLeaveOpen.Hide
ImportAll (stayopen)
End Sub
Private Sub UserForm_Activate()
Dim waitTime As Integer
Dim stayopen As Integer
Dim start As Long
stayopen = 0
waitTime = 3
start = Timer
While Timer < start + waitTime
DoEvents
Wend
If frmLeaveOpen.Visible = True Then
frmLeaveOpen.Hide
ImportAll (stayopen)
End If
End Sub
Private Sub Yesbtn_Click()
Dim stayopen As Integer
stayopen = 1
frmLeaveOpen.Hide
ImportAll (stayopen)
End Sub
If the user clicks Yes or No, it handles accordingly. But if the user does
nothing it defaults as if they were to say no, and runs ImportAll with that
in mind. Beautiful.