+ Reply to Thread
Results 1 to 12 of 12

Compile error: Invalid use of property

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Jacksonville, FL, USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Compile error: Invalid use of property

    Getting a Compile error: Invalid use of property.
    The word Borders in the line: .Borders (xlEdgeBottom) highlighted blue.
    How to resolve the error?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Compile error: Invalid use of property

    Move it up to the end of the prior line.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Compile error: Invalid use of property

    Hi Phil,

    Try this:
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    08-21-2013
    Location
    Jacksonville, FL, USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Compile error: Invalid use of property

    shg, There is a misnomer here - we are not dealing with an "double underline," but rather a double bottom border. "Underline" is for the benefit of users. I did as you suggested and the error cleared; however, the double bottom borders are not changed to the single border. Nothing is happening. What next?

    Please Login or Register  to view this content.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Compile error: Invalid use of property

    Double underline? Text underline or borders?

    Please explain what you're trying to do.

  6. #6
    Registered User
    Join Date
    08-21-2013
    Location
    Jacksonville, FL, USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Compile error: Invalid use of property

    This is from an accounting worksheet. Two columns hold spending entries. Periodically during the month these entries are reconciled against a bank statement. If the last spending balance agrees with the bank, clicking a shape with an attached macro makes a double bottom border, indicating balance.

    At the end of the month, the worksheet is copied to create the worksheet for the next month, and the double bottom borders must be changed back to single bottom borders.
    Last edited by Phil Hageman; 04-03-2015 at 07:19 PM.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Compile error: Invalid use of property

    Pardon?

    How does this relate to your original question? Have we solved that problem and moved on to something else?
    Last edited by shg; 04-04-2015 at 12:25 AM.

  8. #8
    Registered User
    Join Date
    08-21-2013
    Location
    Jacksonville, FL, USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Compile error: Invalid use of property

    I think I have confused two threads. I need to resolve the original issue with the error on the double bottom border macro.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Compile error: Invalid use of property

    See post #5.

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Compile error: Invalid use of property

    Hello Phil Hageman,

    Try this...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  11. #11
    Registered User
    Join Date
    08-21-2013
    Location
    Jacksonville, FL, USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Compile error: Invalid use of property

    Folks, I tried the code in #3 by Marvin and it works, as far as it goes. My logical mistake was that when changing a border in a range, the interior borders are changed, not the edge borders. In this case, the top and bottom edge borders where being changed, which doesn't work in a range.

    Sorry for all the runaround trying to get this done. Appreciate all your time and effort.
    Last edited by Phil Hageman; 04-04-2015 at 07:49 AM.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Compile error: Invalid use of property

    Should be
    Please Login or Register  to view this content.

+ 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: Invalid Use of Property on stupidly simple code
    By QueeniePie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2013, 11:41 AM
  2. Compile Error: Wrong number of arguments or invalid property assignment .... help!
    By powercell99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2013, 03:30 PM
  3. Excel - VBA - Compile error: invalid use of property
    By Ladynerd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-20-2012, 11:22 AM
  4. Replies: 1
    Last Post: 02-17-2006, 12:10 PM
  5. Compile Error - Wrong number of arguements or invalid property ***
    By James T in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2005, 03:50 AM

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