I
itsyash
Hi,
I have a VBA userform. On Button_Click event I have given a task for
the macro the open some files, process and close them. While this is
happening I want the user to see the progress. So i have a label on the
userform which says 'No of files processed'. While I am in the loop,
just before moving to the next file, I use
'frmMain.lblProcessedFiles.Caption = FilesProcessed'
At this time, the value does not show on the label because the loop is
running on the file in the background. Technically the caption of the
label changes but it does not show until the loop ends completely.
I tried using 'frmMain.hide' and 'frmMain.show'. This updated the value
of the label but I think because it goes to form_load event it stops
the loop in the background.
I dont want to put the rest of the code form_load event as this is not
correct.
Please help me.
Thanks,
Yash
I have a VBA userform. On Button_Click event I have given a task for
the macro the open some files, process and close them. While this is
happening I want the user to see the progress. So i have a label on the
userform which says 'No of files processed'. While I am in the loop,
just before moving to the next file, I use
'frmMain.lblProcessedFiles.Caption = FilesProcessed'
At this time, the value does not show on the label because the loop is
running on the file in the background. Technically the caption of the
label changes but it does not show until the loop ends completely.
I tried using 'frmMain.hide' and 'frmMain.show'. This updated the value
of the label but I think because it goes to form_load event it stops
the loop in the background.
I dont want to put the rest of the code form_load event as this is not
correct.
Please help me.
Thanks,
Yash