Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Show progress of copying

Dear all,

I am using Excel 2003 SP2 and VB 6.3

I am trying to use Excel to copy from the server.
for that I use "scripting.filesystemobject" to get the list of files.

'my code is..........
'**********************
Function Copy_Data(ByVal fromFolder As String, ByVal toFolder As
String)

Dim FSO As Object
Set FSO = CreateObject("scripting.filesystemobject")
FSO.copyfolder fromFolder, toFolder

End Function
'**********************

I need to show some kind of progress window. Since the folders are
very big, it takes a lot of time to finish copying.. Is it possible
to show any progress and if so how?????

Thank you.....

Reagrds
Joe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Show progress of copying

Joe,

It's not nearly as well documented but if you use the "Shell.Application"
object rather than the "Scripting.FileSystemObject" to copy the folder, you
will get the standard Windows Explorer show progress bar for copying or
moving files and folders. Try something like:

Sub CopyShowProgress()
Const FOF_SIMPLEPROGRESS = &H100
Dim Shell, Folder
toFldr = "C:\Temp"
fromFldr = "C:\Test"
Set Shell = CreateObject("Shell.Application")
Set Folder = Shell.Namespace(fromFldr)
Folder.CopyHere toFldr, FOF_SIMPLEPROGRESS
Set Shell = Nothing
End Sub

Steve



"Joe" wrote in message
...
Dear all,

I am using Excel 2003 SP2 and VB 6.3

I am trying to use Excel to copy from the server.
for that I use "scripting.filesystemobject" to get the list of files.

'my code is..........
'**********************
Function Copy_Data(ByVal fromFolder As String, ByVal toFolder As
String)

Dim FSO As Object
Set FSO = CreateObject("scripting.filesystemobject")
FSO.copyfolder fromFolder, toFolder

End Function
'**********************

I need to show some kind of progress window. Since the folders are
very big, it takes a lot of time to finish copying.. Is it possible
to show any progress and if so how?????

Thank you.....

Reagrds
Joe



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gantt chart - fill show progress of tasks over task time period??? JohnHamer1977 Excel Discussion (Misc queries) 3 August 29th 06 05:41 AM
How to show a progress bar in sheet calculation? Zoo Excel Programming 4 November 10th 05 06:17 AM
Show an ODBC progress Jonathan Excel Programming 1 October 25th 05 04:44 PM
Show progress in a user form while code runs Bura Tino Excel Programming 2 April 15th 04 06:18 AM


All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"