+ Reply to Thread
Results 1 to 4 of 4

Compile Error: compile error constant expression required.

  1. #1
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    Compile Error: compile error constant expression required.

    Hello friends, Hope all is well!

    This is a cross-post question on Mr. Excel: https://www.mrexcel.com/forum/excel-...-required.html

    A solution couldn't be established, since not enough information was posted. The attachment here should show what is wrong.
    Please help me correct the mistakes, to all the code to work with no errors.

    Your time and efforts are always appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Compile Error: compile error constant expression required.

    Since my arabic is 0% I'm guessing that the value passed as parameter is invalid.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Riyadh
    MS-Off Ver
    Office 365
    Posts
    129

    Re: Compile Error: compile error constant expression required.

    Hello friends, it seems that the VB code is OK now,
    however now I am getting: #VALUE! can you please tell me what is wrong in the code?
    What to do to fix it?
    Attached Files Attached Files

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Compile Error: compile error constant expression required.

    If you het a #VALUE error, that means that the result does NOT have the expected 'value'
    I checked your file but the Function CurrText is not even addressed and you're missing all the etxra parameters.
    so it won't work.
    Here's the view of what CurrText expects to receive before it can process anything
    Attached Images Attached Images

+ 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] Compile Error: Expected Expression
    By gxm100 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-09-2022, 03:22 AM
  2. [SOLVED] Compile Error Constant Expression Required
    By dloskot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2016, 02:46 PM
  3. [SOLVED] UDF gives compile error: expected:expression
    By adh2 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-10-2015, 05:37 PM
  4. Compile error (Constant expression required) when using macro twice
    By flunzy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2014, 10:35 AM
  5. [SOLVED] Compile Error: Expected: expression
    By Wheelie686 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2013, 08:51 AM
  6. [SOLVED] Compile error: Constant expression required error when merging two Codes
    By Kezwick in forum Outlook Programming / VBA / Macros
    Replies: 8
    Last Post: 06-26-2013, 09:32 AM
  7. [SOLVED] Compile Error: Expected Expression, Syntax Error
    By gjohn282 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2012, 11:28 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