Author Topic: Visio Progress Bar  (Read 1996 times)

0 Members and 1 Guest are viewing this topic.

OldSchool1948

  • Jr. Member
  • **
  • Posts: 35
Visio Progress Bar
« on: February 01, 2017, 11:21:22 AM »
I have a long running process and need a progress bar.  I tried to implement the instructions found here:  http://www.excel-easy.com/vba/examples/progress-indicator.html - adapted for my situation. 

The form opens, but the progress bar doesn't move and the form shows "Not Responding" even though I use a modeless form.  If I step through the process, the form updates as it should.

Any suggestions would be greatly appreciated.

Yacine

  • Hero Member
  • *****
  • Posts: 2526
Re: Visio Progress Bar
« Reply #1 on: February 01, 2017, 01:40:53 PM »
I would guess you are calling DoEvents at the wrong place?
 :-\
Yacine

Nikolay

  • Hero Member
  • *****
  • Posts: 768
    • UnmanagedVisio
Re: Visio Progress Bar
« Reply #2 on: February 01, 2017, 03:05:55 PM »
+1 for DoEvents. I suspect it's not called at all. Just add it in your processing loop. See the example in MSDN:
https://msdn.microsoft.com/en-us/library/office/gg264522.aspx

OldSchool1948

  • Jr. Member
  • **
  • Posts: 35
Re: Visio Progress Bar
« Reply #3 on: February 01, 2017, 03:57:32 PM »
Actually, I did use Do Events and it still did not work.  I followed the example in my link, but used my "counters" to increment the bar.  I was getting "Not Responding" and tried other approaches.  I'll try again, outside of my main project to see what happens. 

Thanks for the quick responses.

Regards,

Johnnie

vojo

  • Hero Member
  • *****
  • Posts: 1189
Re: Visio Progress Bar
« Reply #4 on: February 03, 2017, 10:01:34 AM »
and now for something in left field!!!

You could do this purely in a shapesheet.   Will warn you that it is real real pedantic & tedious

Basically, do the following
- Create 10 squares....lets call them sheet.1 thru sheet.10
- line up in a row
- group them...lets call it sheet.11
- at the group level, use a cell to have value  (user cell or props.cell)
- in each child box
     sheet.1!fillforegnd = if(sheet.11!user.progress > 0.1, RGB(<on color>, RGB (<off colore>)
     sheet.2!fillforegnd = if(sheet.11!user.progress > 0.2, RGB(<on color>, RGB (<off colore>)
     sheet.3!fillforegnd = if(sheet.11!user.progress > 0.3, RGB(<on color>, RGB (<off colore>)
     etc

So when a value in parent....right rectangles fire



Hey Ken

  • Full Member
  • ***
  • Posts: 181
  • Just This Guy
    • Ken Krawchuk, Libertarian for Pennsylvania Governor
Re: Visio Progress Bar
« Reply #5 on: February 13, 2019, 03:47:32 PM »
Folks:

   I posted a reply elsewhere that might help resolve this one too.  Check it out: http://visguy.com/vgforum/index.php?topic=8511.msg38061

   - Ken

Ken V. Krawchuk
Libertarian for Pennsylvania Governor (retired)
KenK4Pa.com