+ Reply to Thread
Results 1 to 2 of 2

Need to Create Error Message Box during Runtime error 1004

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    3

    Need to Create Error Message Box during Runtime error 1004

    Hi guys,

    I am using excel to product charts based on how many selections a user makes. i.e. if 5 brands are selected then the user clicks update graph, then the graph will relocate the range and update the graph.

    Please Login or Register  to view this content.

    That is my what I have so far and it works fine, however if a user selects no brands and clicks update graph then I get the runtime error 1004, as the range becomes invalid, How can I create an error message pop up instead?

    Any help would be great

    Thanks,
    Last edited by Richard Buttrey; 01-14-2013 at 06:27 AM. Reason: No code tags

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need to Create Error Message Box during Runtime error 1004

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    Since you're new here I'll change it for you on this occasion but please note for the future.
    One way would be to use a cell to check for how many selections have been made and then test that cell for the value >0 and exit the sub if the value is zero.

    Otherwise upload the workbook since it's not clear to me which range you are referring to.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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