
I have a block of code that is dynamically generated that seems fine, but, the editor indicates some syntax error (by underlining the first character of the sub). I'm not sure what is wrong or what is causing that behavior.
If I use the code as is, it actually operates just fine... It is always the "first" subroutine that gets marked the same way. In the sample below, the letter "P" in the first routine (from Public) gets underlined with red as a syntax error.
If I use the code as is, it actually operates just fine... It is always the "first" subroutine that gets marked the same way. In the sample below, the letter "P" in the first routine (from Public) gets underlined with red as a syntax error.
#Region "Main"
' Main subroutine
Public Sub Main()
Me.Sub1
End Sub
#End Region
#Region "Sub1"
' Sub1
Private Sub Sub1()
' Code goes here
End Sub
#End Region