+ Reply to Thread
Results 1 to 8 of 8

StrReverse function - compile error

  1. #1
    Registered User
    Join Date
    10-04-2018
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    2

    StrReverse function - compile error

    Hi

    I'm new to VBA coding and just learning about string functions.

    I keep getting the following error when trying to use the StrReverse function to reverse the order of a string:
    Compile error: Wrong number of arguments or invalid property assignment

    Here is the code I am using (Excel 2016, VBA v7.1):
    Please Login or Register  to view this content.
    Grateful for any advice!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: StrReverse function - compile error

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: StrReverse function - compile error

    Hello
    I have tested it on excel 2016 and it worked well for me
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: StrReverse function - compile error

    Working fine on my system
    Teach me Excel VBA

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: StrReverse function - compile error

    Also works for me.

  6. #6
    Registered User
    Join Date
    10-04-2018
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    2

    Re: StrReverse function - compile error

    Thanks all for checking, good to know it's not a problem with the code but still very strange. Maybe some issue locally, will try on another machine!

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: StrReverse function - compile error

    May be your file has other invalid lines of code ..

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: StrReverse function - compile error

    Do you have any Subs or variables called StrReverse?

+ 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] Function compile error
    By tnuis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 04:02 PM
  2. [SOLVED] Function Error: Compile error: Expected: list separator or )
    By goss in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-05-2014, 02:10 PM
  3. [SOLVED] Compile Error 'Sub or Function is not define' error on Private Sub Getdata()
    By HafizuddinLowhim in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2014, 11:17 AM
  4. Compile error: Sub or Function not defined Error
    By VBAhelp3456 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-01-2014, 02:16 AM
  5. [SOLVED] Error in function Compile error: Can't find project or library
    By Motario1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-12-2013, 02:20 AM
  6. [SOLVED] Compile Error in Hidden Module and Compile Error: Can't find project or library
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-10-2013, 07:03 PM
  7. help with StrReverse function
    By RompStar in forum Excel General
    Replies: 2
    Last Post: 08-23-2005, 03:05 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