+ Reply to Thread
Results 1 to 4 of 4

Syntax error

  1. #1
    Registered User
    Join Date
    12-26-2020
    Location
    Hungary
    MS-Off Ver
    2013
    Posts
    21

    Syntax error

    Hi,

    Could somebody help me out what is wrong with this sytax? I know it must be something with the " symbol.
    Please Login or Register  to view this content.
    It works when I put something fix instead of the Wb variable.
    ex. .attachments.Add ("C:\Users\cscsontos\Documents\900012.pdf")



    Thank you in advance.

    Whole code:
    Please Login or Register  to view this content.
    Last edited by Csesztes; 01-18-2021 at 09:41 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,987

    Re: Syntax error

    Try:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-26-2020
    Location
    Hungary
    MS-Off Ver
    2013
    Posts
    21

    Re: Syntax error

    Worked. Thank you.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,987

    Re: Syntax error

    You're welcome.

+ 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 syntax error - spellnumber microsoft code
    By sunboy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-13-2022, 02:53 AM
  2. [SOLVED] Runtime Error '3075': Syntax error in the string in the query expression [SQL]
    By leegrj in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-28-2020, 04:11 PM
  3. Replies: 5
    Last Post: 11-28-2019, 04:55 AM
  4. 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
  5. [SOLVED] first timer using VB to cut and paste macro - getting compile error syntax error
    By jopedder in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2013, 11:45 AM
  6. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  7. 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

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