+ Reply to Thread
Results 1 to 49 of 49

Unable to view message box when working on multiple applications

  1. #1
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Unable to view message box when working on multiple applications

    Hello,

    I came across a code which prompts the users to enter time (time is entered in minutes) and reminder message.

    On the specified time the message box pops-up. The code works perfectly if the users are working only on excel.

    Below is the code -

    Please Login or Register  to view this content.
    Problem -

    Since the users mostly work on multiple applications, they are not able to view the message box. But when they jump to excel they are able to view the message box.

    Solution -

    I'm looking for a code which will make the message box appear even if they are working on excel or any application.

    Have attached sample sheet
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,912

    Re: Unable to view message box when working on multiple applications

    Add a line of code before the End Sub

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Hello alansidman,

    I tried your suggestion, but still facing the same problem.

    1st attempt by adding your line in the first part of the code.
    2nd attempt by adding your line in the second part of the code.
    3rd attempt by adding your line in both part of the code.

    Message box does not pop-up if working on different applications. However excel logo keeps blinking on the specified time.

    My requirement is the message box should be visible to the users if they are working on any application.

    Refer snapshot of the problem
    Attached Images Attached Images

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,912

    Re: Unable to view message box when working on multiple applications

    Maybe this solution will work for you.

    http://www.experts-exchange.com/ques...cel-Macro.html

  5. #5
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Hello alansidman,

    I'm not able to view the content of the page as it requires membership.

    I did some googling and came across few code snippets but now sure how to use it in my code

    Below are some of the codes that I came across -

    1st
    Please Login or Register  to view this content.
    2nd
    Please Login or Register  to view this content.
    3rd
    Please Login or Register  to view this content.

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Does this help?

    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  7. #7
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    How do I add your code to my code.

    In other words if I want the CMD box to appear after 5 mins, what part of my code needs to be changed to achieve this.

  8. #8
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    My Bad, I did not see it was an input box.
    In this case try Rory's (Romperstompers) method here,
    http://www.excelforum.com/excel-prog...-of-excel.html
    Using the Windows API,
    Just change the message box to input box

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Hello,

    Edit : I have made few changes to the below code to achieve part of my requirement which is to bring the message box to the front of any application at the specified time.

    Please Login or Register  to view this content.
    Above code also allows the user to enter different reminder messages. I want the pop-up message box to reflect different reminder messages entered. I think below code needs to be changed but don't know how to do it.

    Please Login or Register  to view this content.
    Last edited by bimmy80; 12-24-2015 at 04:27 AM.

  10. #10
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    kindly assist

  11. #11
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Sorry, I don't quite follow what different messages you need and when???

  12. #12
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    The code provides 2 prompts -

    1st prompt asks the user to enter time (time is entered in mins)
    2nd prompt asks the user to enter the reminder message

    Let's say, in the 1st prompt I enter time as 5 mins and in the 2nd prompt I enter reminder message as Update sheet. After 5 mins the message box appears with the reminder message as Update sheet.

    To get a better understanding of above explanation kindly run the macro from the originally attached sheet.

    Above mentioned activity keeps changing. I need the message box pop-up in front of any application at the specified time with the specified reminder.

  13. #13
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Sorry, Christmas got in the way. How are your Input boxes fired off?

  14. #14
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Thanks for dropping in.

    Merry X'Mas.... Hope you had a wonderful celebration with your friends and family.

    I played around with the code and currently I'm able to view the pop-up message box when any application is running.

    Please Login or Register  to view this content.
    The problem now is, how to display different messages whenever the macro is run.

    I think below code needs to be changed to solve above mentioned problem. I don't know how to do it.

    Please Login or Register  to view this content.
    Kindly refer attached sheet to understand my problem.

    Click on the button and insert minutes as 1 and reminder message as Update sheet. After 1 min pop-up box shows the message as This is a native Message Box and not as Update sheet.
    Attached Files Attached Files

  15. #15
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Do you mean something like this?

    Forget that below, I just re-read post, hold on a second.

    Please Login or Register  to view this content.

  16. #16
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Ok, Change all the code to this.

    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Can I have 1 small addition to the above code.

    After clicking OK button on the pop-up message, the user should be taken to the workbook from where the macro is being run.

    Let's say the code is being run from workbook named "Reminder". So after clicking ok button on the pop-up message the user should be taken to Reminder workbook.

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

    Re: Unable to view message box when working on multiple applications

    Hello bimmy80,

    This worked for me.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  19. #19
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Hello Leith Ross,

    The code works well.

    I only need 1 small addition.

    As explained above after clicking ok on the pop-up message the user should be taken to the workbook from where the macro is being run.

  20. #20
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    What if the workbook file path?

  21. #21
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Path is - C:\Users\BIMMY\Downloads\Reminders.xlsm

    If the path is changed, will copy pasting the new path work

  22. #22
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Try this,
    Enter the workbook names into the "arr" variable and if the file path is always the same. If not you will need to adjust the code for the new file path. This macro will deal with several different named books with the same path.

    Please Login or Register  to view this content.

  23. #23
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    I tried above code. After clicking ok on the pop-up message, the code doesn't take me back to reminders workbook.

    The workbook Reminders is saved as xlsm. Does that have anything to do.

  24. #24
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Sorry , try this.
    Please Login or Register  to view this content.

  25. #25
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Sorry, still not happening...

    Have attached sheet for reference.

    Can you check from your side after downloading,and making necessary changes to the path.

    I
    Attached Files Attached Files

  26. #26
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    My bad, had a brain fart.
    try this.

    Please Login or Register  to view this content.
    Last edited by JapanDave; 12-27-2015 at 03:23 AM.

  27. #27
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    I just HOPE you have LOTS of PATIENCE.

    It's not happening.

    Let me again say... On clicking ok on pop-up message the code should take me to the excel workbook (or sheet) from where the macro is being run.

    Don't give up on me...

  28. #28
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    I tested it and it works
    Put it before the "EXIT Sub" line and tell me what it says.

    Please Login or Register  to view this content.

  29. #29
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    When I put the reminder message (2nd prompt) as reminder and run the code, it takes me back to the reminder workbook.

    This is not what I'm looking for.

    Let me explain - (I hope you have run the code and my explanation makes sense)

    When clicked on "Button1" 1st prompt appears, I insert time as 1. Clicking ok gives 2nd prompt, I insert reminder message as "Update Sheet" and click ok.

    After 1 min pop-up box appears with message as "Update Sheet". Clicking ok on the pop-up message should take me back to the workbook from where the macro is being run.

    The current code does go back to the workbook if the message is inserted as "Reminder". If a different message is inserted it does not work.

  30. #30
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696
    Quote Originally Posted by bimmy80 View Post
    When I put the reminder message (2nd prompt) as reminder and run the code, it takes me back to the reminder workbook.

    This is not what I'm looking for.

    Let me explain - (I hope you have run the code and my explanation makes sense)

    When clicked on "Button1" 1st prompt appears, I insert time as 1. Clicking ok gives 2nd prompt, I insert reminder message as "Update Sheet" and click ok.

    After 1 min pop-up box appears with message as "Update Sheet". Clicking ok on the pop-up message should take me back to the workbook from where the macro is being run.

    The current code does go back to the workbook if the message is inserted as "Reminder". If a different message is inserted it does not work.
    I think I follow. Could you give me the names of all the books involved in a certain instance of code running?

  31. #31
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Currently I'm testing the code from my home.

    To test the code I opened 4-5 workbooks, Book1, Book2, Book3, Book4 and Book5. When I ran the code the pop-up came with the message as "Reminder". When clicked on ok the code took me to the reminder workbook.

    I'm will be releasing this code to my team. The usage of excel is huge. Runs into 10-15 workbook for the time being.

  32. #32
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    So is the code that fires the input boxes and the message box is in the workbook named "Reminder"?
    Last edited by JapanDave; 12-27-2015 at 07:00 AM.

  33. #33
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Yes... The code that fires the input boxes and the message box is stored in the workbook by the name "Reminder"

  34. #34
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Quote Originally Posted by bimmy80 View Post
    Yes... The code that fires the input boxes and the message box is stored in the workbook by the name "Reminder"
    So how do you know which workbook needs to have something updated?

  35. #35
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    That's where the 2nd prompt comes into play.

    I just type message (reminder) in the second prompt.

    Let's say I want to update Summary sheet with 15 counts after 20 mns. I run the code, I type 15 in 1st prompt and in the 2nd prompt I type "Upd Summary sheet 15 cts". After 15 mns the pop-up box appears with the message as "Upd Summary sheet 15 cts".

    Click ok button on the pop-up box should take me to the "Reminder" workbook to enter next time and reminder message.
    Last edited by bimmy80; 12-27-2015 at 07:25 AM.

  36. #36
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    So you want the code to take you to "Summary sheet 15 cts" ? Than you want the code to take back to the "Reminder" (the workbook with the code in it). Is the Summary sheet workbook open? Or do you need to have the code open it?

  37. #37
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    There's some confusion here...

    "Reminder" workbook is were the code will be stored. This workbook will be used by the users to insert messages to remind them which workbook or activity needs to be updated after certain time.

    Current code does this, but, it does not take the user back to "Reminder" workbook to insert next message.

  38. #38
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Edit - This post was deleted as it was repeated

  39. #39
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Does this work for you,

    Please Login or Register  to view this content.
    Last edited by JapanDave; 12-27-2015 at 09:38 AM.

  40. #40
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    getting error message as - User defined type not defined - and below code gets highlighted

    Please Login or Register  to view this content.

  41. #41
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    My bad,

    Miss spelled Workbook as Worbook.

    Please Login or Register  to view this content.

  42. #42
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    I kept only "Reminder" workbook open. When i tested the code it takes me back to the ''Reminder'' workbook.

    I tested the code by keeping 2 more workbooks opened - Book1 and Book2, the code does not take me back to the "Reminder" workbook. It takes me to the first active workbook which is Book2.

    Can a code be added to the above code which will make "Reminder" workbook as the active workbook no matter how many workbooks are opened.

  43. #43
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Quote Originally Posted by bimmy80 View Post
    I kept only "Reminder" workbook open. When i tested the code it takes me back to the ''Reminder'' workbook.

    I tested the code by keeping 2 more workbooks opened - Book1 and Book2, the code does not take me back to the "Reminder" workbook. It takes me to the first active workbook which is Book2.

    Can a code be added to the above code which will make "Reminder" workbook as the active workbook no matter how many workbooks are opened.
    OK, I see what you want now.

  44. #44
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    OK, with a bit of help I think I have it.
    This should bring the workbook to the front regardless of what application is running.

    Please Login or Register  to view this content.
    Last edited by JapanDave; 12-28-2015 at 07:43 AM.

  45. #45
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    JapanDave... Its works PERFECTLY.

    You have LOTS of Patience.... and I mean Lots.

    Thanks a TONNE for sticking with me to the end.

  46. #46
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    No problem, don't forget to rep anyone that has helped you.

    Dave

  47. #47
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    By rep you mean rating the thread... Right.

    I did that by clicking on "Rate this Thread" , clicked on 1st option and clicked on vote.

    When I tried again it's giving me the message as " You have already rated this thread"

    What did I do wrong.

  48. #48
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Unable to view message box when working on multiple applications

    Add reputation, click the little star (*) in the bottom left hand corner of the users post you want to rep. Next to report post in the users post.

    Dave

  49. #49
    Registered User
    Join Date
    04-16-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Re: Unable to view message box when working on multiple applications

    Understood...Rep added

+ 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. Unable to view my VBA Project
    By Sam9 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2014, 09:00 AM
  2. Unable to view all text using AutoFit
    By jandtearle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2010, 01:53 PM
  3. How to send a range of cells in a sms text message by using VB -Applications in Excel
    By g00glethis1 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-06-2009, 06:32 PM
  4. Replies: 1
    Last Post: 12-03-2005, 01:10 AM
  5. [SOLVED] Visual Basic for Applications Help not working right.
    By Jack Gillis in forum Excel General
    Replies: 13
    Last Post: 08-17-2005, 09:05 PM
  6. [SOLVED] Visual Basic for Applications Not Working Right -- Follow Up
    By Jack Gillis in forum Excel General
    Replies: 2
    Last Post: 06-06-2005, 05:05 PM
  7. Replies: 1
    Last Post: 03-25-2005, 09:06 AM
  8. [SOLVED] Unable to view changes to spreadsheet
    By Don Pickering in forum Excel General
    Replies: 0
    Last Post: 02-22-2005, 06:06 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