0
Dim Subjects = New String() {"Health Care", "Tax", "Trade", "Technology and Privacy", "Energy and Natural Resources", "Oversight", "Domestic Issues", "Other"}

Receiving a syntax error, looking for an end to the statement, but as far as I can tell this should be proper syntax?

5
  • 1
    That's VB.NET syntax (or close to it at least). Are you writing this is VBA or VB.NET? Commented Nov 5, 2018 at 23:00
  • VBA, because I'm working in Word, but the syntax examples I was learning from were from learn.microsoft.com? Weird that they'd have VB.NET syntax examples. Commented Nov 5, 2018 at 23:40
  • VBA can be difficult to search for documentation on via doc.microsoft.com these days. You need to make sure that you don't see .NET in the page header. TBH, you're probably just better off searching here on SO or using a non-MS site for documentation. Commented Nov 5, 2018 at 23:47
  • Dang okay, thank you! Commented Nov 6, 2018 at 0:10
  • You need to learn to use the F1 key. In the VBA IDE put the cursor on a keyword and press F1. This will take you to the MS help page for that keyword. Commented Nov 6, 2018 at 22:54

1 Answer 1

2
Dim Subjects()
Subjects = Array("Health Care", "Tax", "Trade", "Technology and Privacy", "Energy and Natural Resources", "Oversight", "Domestic Issues", "Other")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.