+ Reply to Thread
Results 1 to 9 of 9

VBA needed for message pop-up

  1. #1
    Registered User
    Join Date
    01-29-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    12

    VBA needed for message pop-up

    excel forum help.xlsx

    Hello,

    I would like a pop up message when "Semi-Monthly" is selected from the dropdown list in cell B1. I can't seem to figure out the VBA by myself. I do not want the message permanently, only when one option is selected in B1.

    Excel 2010

    Do you need any more information?
    Thank you very much!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,903

    Re: VBA needed for message pop-up

    Place this sub routine in the worksheet change event for Sheet1

    Please Login or Register  to view this content.
    Attached Files Attached Files
    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
    01-29-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    12

    Re: VBA needed for message pop-up

    Thanks a bunch, it worked great!

  4. #4
    Registered User
    Join Date
    01-29-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    12

    Re: VBA needed for message pop-up

    I am now getting an error when I try to fill data on this spreadsheet.
    Run-time error '13':
    Type mismatch

    When I debug it highlights: If Target = Range("B1") Then

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,903

    Re: VBA needed for message pop-up

    I am unable to reproduce your error with the worksheet you have provided. Please provide more information on what you are doing to generate this error message. Have you modified the worksheet you provided?

  6. #6
    Registered User
    Join Date
    01-29-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    12

    Re: VBA needed for message pop-up

    I take the file provided as an attachment in the second post of this thread. I put any number in cell D1. I use the fill handle to drag down any number of cells. Then I get the run time error pop up. I have not modified the worksheet other than inputting an integer in cell D1.

  7. #7
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: VBA needed for message pop-up

    Please Login or Register  to view this content.
    This is causing a problem for you because you have a range of cells selected, and excel can't compare a range of cells to a single cell. Target(1) will give you the first cell of the range, so replace your code with the code below, and it should work.

    Please Login or Register  to view this content.

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

    Re: VBA needed for message pop-up

    I think that the code should read

    Please Login or Register  to view this content.
    All the variation of Target = Range("B1) are just testing if the value in the Target cell is the same as the value in B1.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  9. #9
    Registered User
    Join Date
    01-29-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    12

    Re: VBA needed for message pop-up

    Thank you for the prompt reply. I used:

    .Address

    and I am not getting the error. Excellent forum. I'm glad I found it.

+ 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. [SOLVED] Message box with if needed for UserForm
    By WimpieOosthuizen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-26-2014, 02:58 AM
  2. Pop up message needed
    By Gunner_gav in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-18-2013, 12:34 PM
  3. [SOLVED] Message box needed in VBA
    By mitta235p in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-01-2013, 11:40 AM
  4. [SOLVED] Help needed with answering a message box
    By guydixon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2012, 12:46 PM
  5. .dll error message help needed
    By Wylie C in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-01-2005, 04:09 PM

Tags for this Thread

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