+ Reply to Thread
Results 1 to 4 of 4

Touble wih maco code debuger is showin the "Sub" part is wrong

  1. #1
    Registered User
    Join Date
    03-04-2014
    Location
    Norwich,England
    MS-Off Ver
    Excel 2010
    Posts
    20

    Touble wih maco code debuger is showin the "Sub" part is wrong

    When I try to execute a macro he debugger shows up and can't run the macro as the beginning
    Sub Name() is "wrong" can anyone explain why this is happening and how I can fix this?
    Thankyou

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Touble wih maco code debuger is showin the "Sub" part is wrong

    try to change the name of the Sub to something like meName(). it seems than Name is a reserved word.
    Click on the star if you think I helped you

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Touble wih maco code debuger is showin the "Sub" part is wrong

    I would guess you need to change the name of the macro, try to avoid using things that are already defined as something in the VBA object library.

  4. #4
    Registered User
    Join Date
    03-04-2014
    Location
    Norwich,England
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Touble wih maco code debuger is showin the "Sub" part is wrong

    Sorry adyteo and ragulduy I found the problem, there was a "with" within the code and I didn't use "end with" but thankyou for your help anyway!

+ 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] how to "soft code" part of a cell reference and hard code the rest
    By books in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-27-2013, 09:55 PM
  2. solution for the blank cell using the IF function
    By ragnaedge in forum Excel General
    Replies: 4
    Last Post: 08-23-2013, 11:03 AM
  3. Error "Subscript out of range", cant seem to find where code is wrong
    By KeithMale in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2013, 07:07 PM
  4. "Variable not found" What's wrong with my code?
    By Habanero Time in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2011, 06:47 PM
  5. Replies: 4
    Last Post: 08-07-2006, 07:20 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