+ Reply to Thread
Results 1 to 9 of 9

how to add counter in msgbox to show remain times the message will show vba code

  1. #1
    Forum Contributor sspreyer's Avatar
    Join Date
    07-05-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    178

    how to add counter in msgbox to show remain times the message will show vba code

    hi i have some code that check column c if value 133 enter msgbox pops up but once there is 10 cell fill with 133 the message stop but can also offset this by the values in column f eg if column c has 133 enter 6 times and if a cell in column f has 4 in it this will stop message from pop up what i'm trying to do is show in msgbox remain times the message will appear

    here my code:
    Please Login or Register  to view this content.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: how to add counter in msgbox to show remain times the message will show vba code

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor sspreyer's Avatar
    Join Date
    07-05-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: how to add counter in msgbox to show remain times the message will show vba code

    Quote Originally Posted by mikerickson View Post
    Please Login or Register  to view this content.
    thanks have problem getting this to work in my code could show me how i should set this out in the vba code

    thanks sorry for being a pain

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: how to add counter in msgbox to show remain times the message will show vba code

    Replace your existing Case 133 code with what I posted.

  5. #5
    Forum Contributor sspreyer's Avatar
    Join Date
    07-05-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: how to add counter in msgbox to show remain times the message will show vba code

    the code you gave me only counts the number times it see 133 show how many more times . i want how many times left eg 133 value shows message until 10 cells are filled in column c so if vba code see 1 cell filled with 133 message box you have 9 remaining "messages "also this code does stops column f from offset number of times message appears for example if column c has 5 cells with 133 value in them and column f has value 2 enter in a cell there would only be 3 messages remaining hope you understand thanks for your help


    shane
    i have also cross post at http://www.mrexcel.com/forum/excel-q...ions-code.html try help resovle this
    Last edited by sspreyer; 08-25-2013 at 01:46 AM.

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: how to add counter in msgbox to show remain times the message will show vba code

    Have the MsgBox show (11-LngCount) .

  7. #7
    Forum Contributor sspreyer's Avatar
    Join Date
    07-05-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: how to add counter in msgbox to show remain times the message will show vba code

    hi yes that works buts still does not do what, i want. it is cancelling out the formula thats be low
    Please Login or Register  to view this content.
    thanks
    Last edited by sspreyer; 08-25-2013 at 01:45 AM.

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

    Re: how to add counter in msgbox to show remain times the message will show vba code

    Hi, Shane,

    I think you´re wrong about the comparision for lngShow to be -1 because that would show a message with 0 times to come.

    Maybe try
    Please Login or Register  to view this content.
    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

  9. #9
    Forum Contributor sspreyer's Avatar
    Join Date
    07-05-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: how to add counter in msgbox to show remain times the message will show vba code

    Hi Holger you were right About
    I think you´re wrong about the comparision for lngShow to be -1 because that would show a message with 0 times to come.
    yet again you have done it again thank you so much for your help you are :-

    *----- legend-----*

    thanks

    shane

+ 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. Code needed to repopulate a cell if it's deleted and show a message box.
    By Jed Shields in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-07-2013, 11:59 AM
  2. Macro code to show message depends on selection from Combobox/List
    By snn3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2012, 07:00 AM
  3. How to shorten my msgbox code or show on mutiple lines?
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2012, 06:54 PM
  4. Modify code to show message box on duplicate entry
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-24-2011, 07:50 AM
  5. [SOLVED] Do not show $ per week when days remain < 7
    By Walterius in forum Excel General
    Replies: 2
    Last Post: 06-10-2005, 10:05 PM

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