Forum Discussion

Greg Bonaparte's avatar
Greg Bonaparte
Iron Contributor
Dec 28, 2019
Solved

Can someone identify why I get compile error?

The following entry gets a compile error saying expected separator or  list:

 

a = MsgBox("AVsort Disposition @ FREESTOCKCHARTS.COM (IE Browser)" & vbNewLine & "" & vbNewLine & "BUY: 1Month Vwap, Vwap50, Vwap200, LR128 point Northward, Price touching Bollinger bottom & vbNewLine & "HOLD: 1Month Vwap, Vwap50, Vwap200, LR128 point Northward, Price riding Bollinger middle & vbNewLine & "EXIT: 1Month Price touching Bollinger top & vbNewLine & "" & vbNewLine & "ARE YOU READY TO REBALANCE PORTFOLIO?", vbQuestion + vbYesNo, "HonorSystem24")

  • Greg Bonaparte

     

    Hi,

     

    It contains some missing quotes!
    Here is the correct syntax. I also break it down into several lines for easy reading!

    a = MsgBox("AVsort Disposition @ FREESTOCKCHARTS.COM (IE Browser)" _
    & vbNewLine & "" & vbNewLine & _
    "BUY: 1Month Vwap, Vwap50, Vwap200, LR128 point Northward, Price touching Bollinger bottom" _
    & vbNewLine & _
    "HOLD: 1Month Vwap, Vwap50, Vwap200, LR128 point Northward, Price riding Bollinger middle" _
    & vbNewLine & _
    "EXIT: 1Month Price touching Bollinger top" _
    & vbNewLine & "" & vbNewLine & _
    "ARE YOU READY TO REBALANCE PORTFOLIO?", vbQuestion + vbYesNo, "HonorSystem24")

     

    Hope that helps

2 Replies

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Greg Bonaparte

     

    Hi,

     

    It contains some missing quotes!
    Here is the correct syntax. I also break it down into several lines for easy reading!

    a = MsgBox("AVsort Disposition @ FREESTOCKCHARTS.COM (IE Browser)" _
    & vbNewLine & "" & vbNewLine & _
    "BUY: 1Month Vwap, Vwap50, Vwap200, LR128 point Northward, Price touching Bollinger bottom" _
    & vbNewLine & _
    "HOLD: 1Month Vwap, Vwap50, Vwap200, LR128 point Northward, Price riding Bollinger middle" _
    & vbNewLine & _
    "EXIT: 1Month Price touching Bollinger top" _
    & vbNewLine & "" & vbNewLine & _
    "ARE YOU READY TO REBALANCE PORTFOLIO?", vbQuestion + vbYesNo, "HonorSystem24")

     

    Hope that helps

Resources