+ Reply to Thread
Results 1 to 3 of 3

Problem creating a progress bar

  1. #1
    Registered User
    Join Date
    08-27-2008
    Location
    Montreal, Canada
    Posts
    2

    Problem creating a progress bar

    Hello,

    I have some VBA code that searches keywords through a worksheet and deletes the line where the keyword is found. It does this through a loop. Since this is a lengthy process i have created a progress bar. The thing is, the progress bar works, but i have sort of cheated to make it work. In the part:
    UserForm1.ProgressBar1.Value = (progress / 350) * 100
    I have divided by 350, but i have merely found this number by trial and error. With this number the progress bar stops a 100% so this is just a temporary fix. I was wondering how i can count the number of times the loop runs so i can put the proper number instead of 350.
    BTW i found most of this code on the internet.
    Any ideas??

    Please Login or Register  to view this content.
    Last edited by VBA Noob; 08-27-2008 at 04:56 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Nicola777,

    Your variable MyStrings gives you that number...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    08-27-2008
    Location
    Montreal, Canada
    Posts
    2
    Quote Originally Posted by Leith Ross View Post
    Hello Nicola777,

    Your variable MyStrings gives you that number...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Hello
    i added a variable total_rows as variant
    and before the loop added the code
    Please Login or Register  to view this content.
    it jumps from 25% to 50% to 75% then 100% then i get an error message invalid property value
    what am i doing wrong?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Countif funtions problem
    By mike4545 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-17-2007, 02:37 PM
  2. Cell function problem
    By itty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-19-2007, 08:27 AM
  3. Complex nested array formula problem and challenge
    By PeterWilliams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2007, 10:34 PM
  4. Math problem in excel
    By sisterpete in forum Excel General
    Replies: 5
    Last Post: 04-15-2007, 01:04 AM
  5. Replies: 2
    Last Post: 09-12-2006, 10:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1