In a procedure you can only use Dim or Static to declare a variable. If you're wanting to 'save' it's value then you would have to declare it at the class level.
vb.net Code:
Public Class Form1 'Declare here Public s As String Public Sub SomeMethod() End Sub End Class
Edit: here's a link to Access Modifiers since they tie together.




Reply With Quote