Frozen Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that is copying files using fso.copyfile.

This all works great...however I want to display messages on the form in a
text box informing the user about the copying as there are several files
being copied. So I...

me.message_text = "Copying File 1"
fso.copyfile.....................
me.message_text = "Copying File 2"
fso.copyfile.....................
me.message_text = "Copying File 3"
fso.copyfile.....................
me.message_text = "Copying File 4"
fso.copyfile.....................

and so on and so on...when I run the form, the first message text is
displayed, but none of the subsequent messages. So I added me.Repaint after
each message, same thing, even tried adding 3 me.repaints after each message
and still no message change. How can I force the form to be updated with
each message_text while it's performing the file copies?

thanks in advance for your help!
 
If Me.update_template_directory = True Then
Me.progress_text = "Downloading Template Directory"
Me.Repaint
Me.Repaint
Me.Repaint
source_file = "*.*"
source_directory = "X:\CDMi Knowledgebase\Current_CDMi\Templates"
destination_directory = Me.consultant_template_path
fso.copyfile source_directory & "\" & source_file,
destination_directory, True
Me.progress_text = "Download Complete."
Me.Repaint
Me.Repaint
Me.Repaint
End If
If Me.update_presentation_directory = True Then
Me.progress_text = "Downloading Presentation Directory"
Me.Repaint
Me.Repaint
Me.Repaint
source_file = "*.*"
source_directory = "X:\CDMi Knowledgebase\Current_CDMi\Presentations"
destination_directory = Me.consultant_presentation_path
'MsgBox source_directory & "\" & source_file & destination_directory
& "\" & destination_file
fso.copyfile source_directory & "\" & source_file,
destination_directory, True
Me.progress_text = "Download Complete."
Me.Repaint
Me.Repaint
Me.Repaint
End If
 
Try inserting a DoEvents code step after you set the value of
"progress_text" textbox in each block.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top