Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alert gui

Status
Not open for further replies.

cjulka

Programmer
Aug 1, 2004
2
US
I am using VBA and am interested in popping up a message box alert gui(or any kind of alert) when a certain condition arises. However, when this alert comes up, I want the program to still continue running and not pause because of the alert. I just want the alert to come up, so then someone can see that there was a problem. Any help is appreciated. Thanks.
 
Hi,

Either use the timer control to display the msgbox for x seconds (control will pass back to the code after x seconds), or display the msgbox AFTER your code has finished processing.

Regards,

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
Are you wanting to show these 'pop-up' forms when an algorithm is running?

I take it you don't want to just store all the error messages and display them at the end of the algorithm(?). I hope the number of possible error messages is small :)

Here's one approach...create a form to use as a popup form:
Code:
Option Compare Database
Option Explicit
Private mfrmPopups() As Form

Private Sub cmdRun_Click()
  Dim frmPopup As Form
  Dim i As Long
  
  ReDim mfrmPopups(0)
  
  For i = 1 To 3
    Set frmPopup = New Form_frmPopUp
    frmPopup.Caption = "Popup #" & UBound(mfrmPopups) + 1
    frmPopup.Visible = True
    Set mfrmPopups(UBound(mfrmPopups)) = frmPopup
    ReDim Preserve mfrmPopups(UBound(mfrmPopups) + 1)
    DoEvents
  Next i
End Sub

Cheers
Dan
 
Basically, I want to display a message that requires no user input. So the user does not need to press ok or cancel. The program should just display a message, but continue running. I will try these out. Is there any way to use something like a DialogBox instead of a message box? Thanks
 
You may take a look at the Application.SysCmd method to write some info on the StatusBar.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
DanJR's sub looks interesting. Check out everything people added here: thread705-889637. I've used the text-based option with a label that allows users to continue working while a lengthy sub runs in the background. DoEvents is the key.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top