g INTRODUCTION
If you want to make an efficient Excel Application, you will have to make it interactive. That means that you will have to facilitate the "dialog" between the application, the machine and the user. If you take into account all the specific requirements to make good and realiable Excel application, the dialog between the application and the machine, I mean between the software and the harware, will be easy. Then you will have to assegurate the interactivity between the user and the rest. The here after routine allow you to inform the user about a process in progres. Then, when the user executes a programm, his mind remains focused on his work. He will be able to see very quickly if the thing are or are not being executed correctly, and he will be able to iniciate the most relevant actions in the shortest delays.
g THE ROUTINES
Let us assign the name "Dataprocessing" to the User Form . When the Userform is activated, it automatically activates the routine "Main" [1]. This routine represents two For ... Next structures, the second one being included in the first one [2].This routine makes the red rectanlge greater and greater until the maximum of 100%. "Dataprocessing is the name of the Userform [3].
[1]-----------------------------------If you want to make an efficient Excel Application, you will have to make it interactive. That means that you will have to facilitate the "dialog" between the application, the machine and the user. If you take into account all the specific requirements to make good and realiable Excel application, the dialog between the application and the machine, I mean between the software and the harware, will be easy. Then you will have to assegurate the interactivity between the user and the rest. The here after routine allow you to inform the user about a process in progres. Then, when the user executes a programm, his mind remains focused on his work. He will be able to see very quickly if the thing are or are not being executed correctly, and he will be able to iniciate the most relevant actions in the shortest delays.
g THE ROUTINES
Let us assign the name "Dataprocessing" to the User Form . When the Userform is activated, it automatically activates the routine "Main" [1]. This routine represents two For ... Next structures, the second one being included in the first one [2].This routine makes the red rectanlge greater and greater until the maximum of 100%. "Dataprocessing is the name of the Userform [3].
Private Sub Userform_Activate()
Call Main
End Sub
[2]-----------------------------------
Sub Main()
AMax = 20000BMax = 2500
For a = 1 To 20000
For b = 1 To 2500
Counter = Counter + 1
Next b
PctDone = Counter / (AMax * BMax)
Call UpdateProgress(PctDone)
Next a
End Sub
[3]-----------------------------------
Sub UpdateProgress(Pct)
With DataProcessing
.FrameProgress.Caption = Format(Pct, "0%")
.LabelProgress.Width = Pct * (.FrameProgress.Width - 10)
.Repaint
End With
End Sub
--------------------------------------
g PICTURE 1 : USERFORM DIALOG BOX

g PICTURE 2 : USERFORM DURING EXECUTION
No hay comentarios:
Publicar un comentario