Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Implement a progress bar when the macro run inside another workboo

Hi,
I have a macro that generate a Word document from Excel with a progress bar
indicator. I have another Excel file (main file) that can create Word report
one by one by opening an excel file #1, create the report #1, opening excel
file #2, word report #2, etc. During this process, I would like to indicate
the progress bar of the file #1. #2, ... inside the main excel file progress
bar.
Thank you!
Alex

File #1 33%, 34%, 35%, etc.
File #2 0%
File #3 0%
I have a macro which is called "ExecuteReport" inside "Thisworkbook" class
module which is executed from the main excel file like:
Dim wb As Workbook
Load UserForm1 'ProgressBar
UserForm1.Show
For Each wb in ...
Set wb = Workbooks("File #i.xls")
wb.Executereport 'Is there a way to update Userform1 ProgressBar during
the production of the word document. (takes 2 minutes to do!)
set Wb = Nohting
Next wb

--
Alex St-Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Implement a progress bar when the macro run inside another workboo

There are a couple of possible solutions here...

http://j-walk.com/ss/excel/files/developer.htm

Check out Controlling LEDs and progress indicator.
--
HTH...

Jim Thomlinson


"Alex St-Pierre" wrote:

Hi,
I have a macro that generate a Word document from Excel with a progress bar
indicator. I have another Excel file (main file) that can create Word report
one by one by opening an excel file #1, create the report #1, opening excel
file #2, word report #2, etc. During this process, I would like to indicate
the progress bar of the file #1. #2, ... inside the main excel file progress
bar.
Thank you!
Alex

File #1 33%, 34%, 35%, etc.
File #2 0%
File #3 0%
I have a macro which is called "ExecuteReport" inside "Thisworkbook" class
module which is executed from the main excel file like:
Dim wb As Workbook
Load UserForm1 'ProgressBar
UserForm1.Show
For Each wb in ...
Set wb = Workbooks("File #i.xls")
wb.Executereport 'Is there a way to update Userform1 ProgressBar during
the production of the word document. (takes 2 minutes to do!)
set Wb = Nohting
Next wb

--
Alex St-Pierre

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Implement a progress bar when the macro run inside another wor

Thank's
Finally I did it by a transfer of the userform from wb#1 to wb#2.
In wb #1:
With UserForm1
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width - 10)
End With
DoEvents

Dim wb As Workbook
Dim docWord As Word.Document
Set wb = Workbooks("abc.xls")
wb.ExecuteReport docWord:=docWord, ExcelTable:=False, UserForm:=UserForm1

In wb #2, I have added the parameter:
Public Sub ExecuteReport(docWord As Word.Document, ExcelTable As Boolean,
userform As Object)
userform.FrameProgress.Caption = "Alex" update the userform!!

Thank's a lot!

--
Alex St-Pierre


"Jim Thomlinson" wrote:

There are a couple of possible solutions here...

http://j-walk.com/ss/excel/files/developer.htm

Check out Controlling LEDs and progress indicator.
--
HTH...

Jim Thomlinson


"Alex St-Pierre" wrote:

Hi,
I have a macro that generate a Word document from Excel with a progress bar
indicator. I have another Excel file (main file) that can create Word report
one by one by opening an excel file #1, create the report #1, opening excel
file #2, word report #2, etc. During this process, I would like to indicate
the progress bar of the file #1. #2, ... inside the main excel file progress
bar.
Thank you!
Alex

File #1 33%, 34%, 35%, etc.
File #2 0%
File #3 0%
I have a macro which is called "ExecuteReport" inside "Thisworkbook" class
module which is executed from the main excel file like:
Dim wb As Workbook
Load UserForm1 'ProgressBar
UserForm1.Show
For Each wb in ...
Set wb = Workbooks("File #i.xls")
wb.Executereport 'Is there a way to update Userform1 ProgressBar during
the production of the word document. (takes 2 minutes to do!)
set Wb = Nohting
Next wb

--
Alex St-Pierre

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
How to implement the progress bar to indicate the Macro start to finish tlee Excel Programming 6 May 25th 09 05:26 AM
Need help with a macro that takes information from another workboo ZBelden Excel Programming 2 February 8th 08 03:46 PM
Macro question - Need to copy data & formatting to another workboo Rog Excel Programming 3 July 27th 06 04:00 PM
Can you code a macro so it runs multiple times in the same workboo dpmac Excel Discussion (Misc queries) 2 April 18th 06 07:40 PM
Implement object persistence inside Excel Tom Chau Excel Discussion (Misc queries) 2 April 7th 06 01:48 AM


All times are GMT +1. The time now is 06:18 AM.

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

About Us

"It's about Microsoft Excel"