+ Reply to Thread
Results 1 to 5 of 5

Syntax Issue

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, 2003
    Posts
    84

    Syntax Issue

    I have the following sub for a macro which will grab a portion of one of the sheets and save it to a jpg file.

    Please Login or Register  to view this content.
    What I need to do is the allow the filename, in this case H:\BOM.jpg to be concatenated from a value in one of the cells ThisWorkbook.Sheets("Sheet1").Range("F10"). But when I try this like so

    Please Login or Register  to view this content.
    I keep getting an Expected: list separator or ) error message.
    Wish I didn't know now what I didn't know then.

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Syntax Issue

    Try creating a variable, then saving based on the variable name.

    Something like:
    Please Login or Register  to view this content.
    Then use fName as your filename.

  3. #3
    Registered User
    Join Date
    01-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, 2003
    Posts
    84

    Re: Syntax Issue

    Thanks...that worked nicely. I was hoping to avoid the assignment of another variable but in this case it appears that all the quote marks confuses the issue. Thank you again.

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Syntax Issue

    No Problem. I'm glad it solved your problem.

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Syntax Issue

    @ Vladamir

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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