+ Reply to Thread
Results 1 to 2 of 2

Use message box variable

  1. #1
    Registered User
    Join Date
    10-19-2017
    Location
    leeds
    MS-Off Ver
    2013
    Posts
    3

    Use message box variable

    Good morning

    Not knew to here but for the life of me i cant remember my old details.

    I have built a macro which, in essence. Looks for a name, performs a match on a different workbook, identifies the correct row , selects that row, and pastes it back in the original document.
    I have having problems with the match failing due to naming differences.

    Is there any way i can have a message box to appear and ask for a new name.
    So for example, the original variable is "Orange", but in the other workbook its called "Oranges", so in stead of ending the macro, the message box appears, asks for a different name which can be manually entered and then the macro continues.
    Or if that entry just does not exist in the other workbook at all, the message box will say, would you like to 0 the results.

    Please find below my macro as it stands. The variable i am looking for is P.
    Any help would be appreciated, or if you require further information please let me know.
    Thanks !


    Please Login or Register  to view this content.
    Last edited by alansidman; 10-19-2017 at 04:20 AM.

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

    Re: Use message box variable

    Code Tags Added
    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 at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    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

+ 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. object variable or block variable not set Error message in Macro
    By loguraja10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-25-2017, 09:01 AM
  2. [SOLVED] Enter variable data into a message-box ?
    By Quisemar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2016, 12:02 PM
  3. [SOLVED] message box popup with variable
    By rickmeister in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2013, 11:23 PM
  4. Error Message: Object variable or with block not set?
    By esawah in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2010, 03:05 AM
  5. Object variable or With block variable not set" error message
    By JoeS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-22-2009, 11:51 AM
  6. Formatting a variable used in a message
    By akronpow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2007, 05:53 PM
  7. [SOLVED] object variable error message
    By Pops Jackson in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-12-2006, 05:45 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