![]() |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have a macro and want to display an informational message box that updates the user on what the macro is doing at that time. My problem is, every message box stops the app and waits for the user to click ok before it resumes. I just need one without any buttons that is for info only.
How is this done? |
#2
|
|||
|
|||
![]()
how about showing a form?
like: frm_example.show .. frm_example.hide -- SeelenQuell[/b] |
#3
|
||||
|
||||
![]()
Just showing a form won't work because this will stall your main process until the form is closed.
VBA cannot show a modeless form if there is a modal form displayed. That's another limitation. What can be done, however, is to show a form and do the actual processing in that form and update the form with the progress. So, you show your main form, take the user's input, then when OK is pressed show another form. Or it's even easier to just show a progress bar/status message in your main form while the processing goes on. I used this approach in a few of my own macros like Calendar Wizard or Function Plotter. You might have noticed that there is a status bar at the bottom of the macros' forms and it will show the progress as the macro goes about its stuff. Yet another solution for CorelDRAW 12 is to use the new AppStatus class which can utilize CorelDRAW's status bar and its progress meter. Here is an example which shows how to display the macro's progress in CorelDRAW's status bar: Code:
Sub ShowProgress() Dim doc As Document Dim n As Long Dim stat As AppStatus Set stat = Application.Status Set doc = CreateDocument stat.BeginProgress CanAbort:=True For n = 1 To 1000 doc.ActiveLayer.CreateRectangle2 Rnd() * 8, Rnd() * 11, Rnd() * 5, Rnd() * 5 If (n Mod 10) = 0 Then stat.UpdateProgress If stat.Aborted Then Exit For End If Next n stat.EndProgress End Sub I hope this helps. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Unexpected condition" error message (with code) | s_federici | CorelDRAW/Corel DESIGNER VBA | 10 | 10-07-2003 21:46 |
takes Draw a long time to start a new document! | bbolte | CorelDRAW/Corel DESIGNER VBA | 5 | 14-05-2003 09:09 |