Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bob,
Finally, I have reboot my computer and the program run without stoping anywhere.. The DoEvents works. Every time I update the processbar, I execute DoEvents. Thanks! Alex Sub ProcessBar(ProcessPerc As Variant, ProcessLabel As String) 'ProcessPerc go from 0 to 1 DoEvents With UserForm3 .Caption = Format(ProcessPerc, "0%") .LabelPROGBAR.Width = UserForm3.Width * Avancement .TextBoxPROGBAR.Text = ProcessLabel .Repaint End With End Sub -- Alex St-Pierre "Bob Phillips" wrote: Where is the code managing the progress bar? -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Alex St-Pierre" wrote in message ... Hi! I tried to add "DoEvents" in the sub that update the process bar but I have to press continue at each 2 seconds. I don't press on anything. Any idea? Here is example of lines where the macro stop: UserForm1.Show rng.Select jBegin = jBegin + 1 iColTot = Selection.Columns.Count wsTmp.Activate End if -- Alex St-Pierre "Bob Phillips" wrote: Your code needs to give the form button press the chance to get a look in, issuing DoEvents throughout the code that updates the progress bar. Beyond that, we would need to see the code. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Alex St-Pierre" wrote in message ... Hi ! When I click on form1 (execute button), I close form1 and open a form2 which indicate a process bar and there is a Cancel button to stop the macro. When I click on it, the macro continue to run. Is there a way to stop the macro? Thanks!! Alex 'Userform1: Private Sub CreateReport_Click() UserForm1.Hide UserForm2.Show End End Sub 'Userform2: Private Sub UserForm_Activate() Call MainMacro Unload UserForm2 End Sub Private Sub CommandButtonCancel_Click() End 'doesn't work End Sub -- Alex St-Pierre |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to get userform Cancel button to invoke Exit Sub in calling macro? | New Users to Excel | |||
Cancel button to cancel the whole macro | Excel Programming | |||
Cancel Macro is user selects 'cancel' at save menu | Excel Programming | |||
how to stop program with loop by click "Cancel" button | Excel Programming | |||
Button To Cancel Macro | Excel Programming |