+ Reply to Thread
Results 1 to 4 of 4

Ambiguous Name Detected

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    195

    Ambiguous Name Detected

    Hi guys, Im trying to use an MID funtion on a string to create another string.

    e.g. when I enter 11-05-10 in to a textbox, the date is entered as a string but I want to take the 05 and cast it as a differant string 'May_10' within a filepath.

    Im getting a compile error that 'Month' is ambiguous.

    Ive included some of my code below. any help would be apreciated.
    Cheers

    Please Login or Register  to view this content.

  2. #2
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,491

    Re: Ambiguous Name Detected

    The Ambiguous message means you're using something that already exists, or that you've used elsewhere in your own code for something else.

    Try changing the Month variable to Mth, rename the sub itself.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,491

    Re: Ambiguous Name Detected

    Another suggestion:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: Ambiguous Name Detected

    You can't use Month a sa Variable because it is "reserved" by Excel for the Month Function. maybe
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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