+ Reply to Thread
Results 1 to 9 of 9

Compile error: Constant expression required error when merging two Codes

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2003 - 07
    Posts
    69

    Compile error: Constant expression required error when merging two Codes

    Hi Guys,

    Should be a strait forward fix (last words) have 2 macros here one that creates a folder and one that saves selected emails into a folder so I combined the 2 (I thought) and came up with this so that it would save the created folders in the folder location I just created, I thought it was simple just add a “& strNewFolderName” to the file location but no came up with a error. Below is the code any help would be met with love and cookies!!

    Regards

    Kezwick


    Please Login or Register  to view this content.
    Last edited by Kezwick; 06-26-2013 at 09:25 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Compile error: Constant expression required error when merging two Codes

    Save_To_Folder can't be a constant because your assigning a value to it with the inputbox.
    redefine it as a string variable
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    09-19-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2003 - 07
    Posts
    69

    Re: Compile error: Constant expression required error when merging two Codes

    ahhh makes a bit of sense now so
    Please Login or Register  to view this content.
    Last edited by Kezwick; 06-26-2013 at 08:47 AM. Reason: spelling was appalling!!!

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Compile error: Constant expression required error when merging two Codes

    That looks good

  5. #5
    Registered User
    Join Date
    09-19-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2003 - 07
    Posts
    69

    Re: Compile error: Constant expression required error when merging two Codes

    i will give it a go and get back to you hopfully the frankenstine macro will work ! haha

  6. #6
    Registered User
    Join Date
    09-19-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2003 - 07
    Posts
    69

    Re: Compile error: Constant expression required error when merging two Codes

    famous last words!!!

    it came up with this time a run time error (never seen before!!) -2147287037 (80030003)
    then points to this line

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Compile error: Constant expression required error when merging two Codes

    Try Putting a very simple BTFM number in ... Pure text is best

  8. #8
    Registered User
    Join Date
    09-19-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2003 - 07
    Posts
    69

    Re: Compile error: Constant expression required error when merging two Codes

    Ignore me i have been a 24 carat plonker!!! i had one string saying 1 directory adn 1 saying another!

    thanks for the help though have +1'ed you

  9. #9
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Compile error: Constant expression required error when merging two Codes

    LOL.... Cheers mucker

+ 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