0

Im new to programming and I cannot figure out why it says End of Statement Expected under EventInteger.ToString() I tried to copy the example in my VB book but it's not working.

MessageString = "Total Daily Sales:" &
        DailyTotalDecimal.ToString("C") &
        Environment.NewLine & Environment.Newline &
        "Total Number of Orders:" EventInteger.ToString()
Cheran Shunmugavel
  • 8,319
  • 1
  • 33
  • 40

1 Answers1

3

The line-continuation character in VB is _. Reference: http://support.microsoft.com/kb/141513

To continue a statement from one line to the next, type a space followed by the line-continuation character [the underscore character on your keyboard (_)].

Example:

MessageString = "Total Daily Sales:" & _
        DailyTotalDecimal.ToString("C") & _
        Environment.NewLine & Environment.Newline & _
        "Total Number of Orders:" & EventInteger.ToString() 'you were missing a &
mechanical_meat
  • 163,903
  • 24
  • 228
  • 223