+ Reply to Thread
Results 1 to 4 of 4

Compile error

  1. #1
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Angry Compile error

    Hello everyone,

    Can anyone help with this macro? I am getting a compile error for where it is highlighted, but before I change it is was throwing a error on the file path and causing when closed to show that it was still open and when trying to reopen it was saying the file was in use as a read only file.
    Here is the code:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    Thank you in advance for your knowledge and help!
    Last edited by LeapingLizard; 06-05-2019 at 10:29 AM. Reason: Warning about code tags

  2. #2
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: Compile error

    Sorry here is where it was throwing a compile error;
    Please Login or Register  to view this content.
    FilePath = "\\wellspan.org\shares\LDrive\GH Linen Orders\Ordering Backup\"
    & myDateStamp & ".xls"
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Compile error

    That needs to be all on one line,
    Please Login or Register  to view this content.
    unless you use a line continuation character.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: Compile error

    Thank you Norie solved

+ 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: Wrong number of arguments or invalid property assignment Error
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-22-2016, 05:29 PM
  2. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  3. [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
  4. [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
  5. Syntax Error and Compile Error: Expected Line Number or Label...
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-31-2011, 09:59 AM
  6. compile error: compile error expected
    By odeno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2008, 04:30 PM
  7. VBAProject name compile error, not defined at compile time
    By Matthew Dodds in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2005, 03:20 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