+ Reply to Thread
Results 1 to 5 of 5

Progress Bar To a button on a userfrom

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    19

    Progress Bar To a button on a userfrom

    I have a delete form that finds the product ID in the first column and then deletes the entire row.. I wanted to add a progress bar to the button so when clicked the user can see when the item has been fully deleted.

    This is my code

    Dim rng1 As Range

    MsgBox "Are you sure you want to delete this item?", vbCritical + vbYesNo

    If vbYes Then



    Set rng1 = Sheets("PRODUCT").Cells.Find(Me.txtDelete.Value, , xlValues, xlWhole)


    txtDelete = ""
    txtLayoutNo = ""
    txtCategory = ""
    txtProductDescription = ""
    txtUnitPriceIE = ""
    txtUnitPriceNI = ""

    rng1.EntireRow.Delete

    Else

    If vbNo Then

    Unload Me
    FrmHomepage.Show



    End If

    End If

    End Sub

    Thanks
    Last edited by peels2141; 07-05-2013 at 08:27 AM.

  2. #2
    Forum Contributor
    Join Date
    11-25-2010
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    120

    Re: Progress Bar To a button on a userfrom

    Hi I did some code examples for progress bars a while back try the attached it should get you started.

    One uses a userform with a custom label and the other uses the progressbar object, although I doubt the latter is available in Excel 2003.
    Attached Files Attached Files
    Last edited by Lifesigns; 07-05-2013 at 09:07 AM. Reason: Wrong file
    If the post was helpful please click the black star on the bottom left to add some reputation and mark your thread as SOLVED.

    A day with nothing new achieved or learned, albeit however small, is a day lost forever?

    Constant Never Ending Improvement

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Progress Bar To a button on a userfrom

    Hi, peels2141,

    please remember to add code-tags to your code - thank you.

    A ProgressBar for the deletion of one item seems a bit of overkill - won`t a simple msgBox do the same?

    Please Login or Register  to view this content.
    @Lifesigns:
    which attachment? (sorry, didnīt see the update in the preview window).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    07-02-2013
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Progress Bar To a button on a userfrom

    Hi Lifesigns and HaHoBe,

    Thanks for your response. I completly agree with you HaHoBe the message box will work perfectly, and id say the progress bar would have affected the speed of the process even further being honest, so the message box works perfectly thanks a lot.

    Peels

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Progress Bar To a button on a userfrom

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Never use Merged Cells in Excel

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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