+ Reply to Thread
Results 1 to 3 of 3

Help with "Compile Error: Expected: Expression"

  1. #1
    Registered User
    Join Date
    12-12-2018
    Location
    West Sacramento
    MS-Off Ver
    MS Office 365
    Posts
    6

    Help with "Compile Error: Expected: Expression"

    Hello all,

    I have attached a spreadsheet containing VBA code provided to me by someone I am unable to contact to fix. There are three sections in red that are causing the message "Compile Error: Expected: Expression." The spreadsheet is designed to pull historical data from Yahoo finance for any ticker symbol listed on the sheet tab. I am a total newbie with VBA and Macros, thus hoping someone here will help me correct the code and get the workbook functioning properly. Thanks
    Attached Files Attached Files
    Last edited by Dan Imal; 12-19-2018 at 01:24 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,594

    Re: Help with "Compile Error: Expected: Expression"

    Your code needs a space between .Sort and the "_"
    When the parameters are on separate lines, you need a space and a "_" after the comma:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    12-12-2018
    Location
    West Sacramento
    MS-Off Ver
    MS Office 365
    Posts
    6

    Re: Help with "Compile Error: Expected: Expression"

    Thanks protonLeah! I was able to correct all the errors based on your advice. Now on to figuring out why its not retrieving the financial data from Yahoo Finance.
    If I can't figure that out on my own I may be posting a new thread.

+ 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] "ActiveWorkbook.Path" fails - triggers "Compile Error Object required"
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2018, 02:58 PM
  2. [SOLVED] Shell Function "Compile Error: Expected procedure, not variable"
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-09-2014, 01:20 PM
  3. [SOLVED] Compile Error - "Expected array "- when declaring a string variable??
    By wazimu13 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-09-2013, 03:20 PM
  4. Why is this code gives "Compile error Expected: list seperator or)"
    By arungene in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2012, 10:08 AM
  5. [SOLVED] Problem with "Compile error: Expected Fuction or variable"
    By perducci in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2012, 11:59 AM
  6. GoTo compile error: "Expected: line number or label"
    By elfsprin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-29-2011, 09:21 PM
  7. Mac issue (please help) "Compile error: Expected Function or variable"
    By m1notaur in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-22-2011, 06:00 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