Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help, Progress bar with multiple macros


Hi, I have a quick question. I have a large program i wanted to add
progress bar to. I have done so but dont know how to make the progres
bar update when i call a macro from within a macro... For example..
here is some code from my program


sub calling_Macro()

Dim PB As clsProgBar
Set PB = New clsProgBar


frmExportData.Hide

With PB
.Title = "Preparing Import please wait...."
.Caption2 = ""
.Caption3 = ""
.Show

For nCounter = 0 To 3

.Progress = nCounter
.Caption1 = "Percent Complete " & CStr(nCounter) & "%"

For lWaitCount = 0 To 1000000

If UserCancelled = True Then GoTo EndRoutine

Next lWaitCount

Next nCounter


Macro_called ' runs a subprogram which performs other functions

end with
.finish
end sub

What happens here is the progress bar updates fine as long as i updat
it within the one macro. But how do i update the same userform from
different macro. This progress bar is using a class and is from

www.enhanceddatasystems.com

please help

Thank

--
greenfalco
-----------------------------------------------------------------------
greenfalcon's Profile: http://www.excelforum.com/member.php...fo&userid=1362
View this thread: http://www.excelforum.com/showthread.php?threadid=56527

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help, Progress bar with multiple macros


i thought this would be pretty simpl

--
greenfalco
-----------------------------------------------------------------------
greenfalcon's Profile: http://www.excelforum.com/member.php...fo&userid=1362
View this thread: http://www.excelforum.com/showthread.php?threadid=56527

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Help, Progress bar with multiple macros

have you tried dim the ProgressBar out side the sub routine? this
should make it a "Global" variable and allow other macros to access it.

Dim PB as clsProgBar

Sub.....

HTH

Die_Another_Day
greenfalcon wrote:
i thought this would be pretty simple


--
greenfalcon
------------------------------------------------------------------------
greenfalcon's Profile: http://www.excelforum.com/member.php...o&userid=13622
View this thread: http://www.excelforum.com/showthread...hreadid=565273


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
Run multiple macros puiuluipui Excel Discussion (Misc queries) 4 September 17th 09 06:42 PM
Macros across multiple files peterhine21 Excel Programming 1 June 5th 06 09:34 AM
Select from multiple macros aswert1223 Excel Programming 3 November 21st 05 08:54 PM
customised printing of multiple pivot charts & tables - unsure how to progress Tim[_39_] Excel Programming 2 August 24th 05 01:50 PM
macros in multiple worksheets No Name Excel Programming 1 May 13th 04 01:44 PM


All times are GMT +1. The time now is 01:31 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"