+ Reply to Thread
Results 1 to 13 of 13

VBA messagebox

  1. #1
    Registered User
    Join Date
    01-17-2015
    Location
    Nederland
    MS-Off Ver
    Office 2011
    Posts
    15

    VBA messagebox

    Hello everybody,

    I want to create a VBA-for my worksheet wich performs the following action.

    When the value of a specific cell changes i want a messagebox wich asks the user to check the value in the cell.

    Hope somebody can help me.

    thanx

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: VBA messagebox

    Hi,
    Welcome to the Forum.

    Based on your description, place this code on Sheet Module.
    Right click on the Sheet Tab --> View Code --> Paste the below code in the opened code window.

    Assuming your specific cell is A1, then try this.....

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    01-17-2015
    Location
    Nederland
    MS-Off Ver
    Office 2011
    Posts
    15

    Re: VBA messagebox

    You are Brilliant!

    Can you help me a little more?

    I want the first message box to ask if the value is correct, if 'yes' no further action. If 'no', i want a message box to just display a message.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: VBA messagebox

    Maybe this.....
    Please Login or Register  to view this content.
    Paste the above code on Sheet module as explained earlier.

  5. #5
    Registered User
    Join Date
    01-17-2015
    Location
    Nederland
    MS-Off Ver
    Office 2011
    Posts
    15

    Re: VBA messagebox

    You are genius....

    one more question.

    If A1 changes cause of a formule in A1 it won't work. Is there a solution?

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: VBA messagebox

    In that case you can use the reference cell used in formula as a Target cell. Say A1=B1*10 and if B1 changes, A1 will also change. Therefore using this logic, you can track the change in A1. Of course the code will change to have B1 as Target cell this time.

  7. #7
    Registered User
    Join Date
    01-17-2015
    Location
    Nederland
    MS-Off Ver
    Office 2011
    Posts
    15

    Re: VBA messagebox

    Thanx u very very much!

    Were u from?

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: VBA messagebox

    You're welcome.

    I am from India as you can check that in my profile.

    If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

  9. #9
    Registered User
    Join Date
    01-17-2015
    Location
    Nederland
    MS-Off Ver
    Office 2011
    Posts
    15

    Re: VBA messagebox

    ah india! Well if i can help u, what probably wont happen with excel or VBA you're welcome!

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: VBA messagebox

    Thanks. Take Care.

  11. #11
    Registered User
    Join Date
    01-17-2015
    Location
    Nederland
    MS-Off Ver
    Office 2011
    Posts
    15

    Re: VBA messagebox

    one more question again... i'm sorry!

    Is there a possibilty to determine the possition of de messagebox? for example a little lower in the screen?

  12. #12
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: VBA messagebox

    I don't think that it is possible with VBA Msgbox as the MsgBox function doesn't include any way to specify a location.

  13. #13
    Registered User
    Join Date
    01-17-2015
    Location
    Nederland
    MS-Off Ver
    Office 2011
    Posts
    15

    Re: VBA messagebox

    Oke anyway Thanx!

+ 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. Pop-up a messagebox every 10:00 PM of the day
    By puuts in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2014, 12:46 PM
  2. [SOLVED] messagebox
    By Oeysbrei in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 05-01-2012, 05:14 PM
  3. messagebox help
    By SMILE in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2011, 08:05 AM
  4. [SOLVED] Anything wrong with Messagebox API?
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2006, 03:00 PM
  5. Messagebox
    By Anthraxitus in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-07-2005, 05:42 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