What is the error in this section of code?

Enderscz used Ask the Experts™
Dim scholar As Student
Private Sub btnGo_Click(...) Handles btnGo.Click
   Dim firstName as String
   scholar.Name = "Warren"
   firstName = scholar.Name
End Sub
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

You should click on "Request Attention" and tell them what language you are using so your question will be put in the right zone.
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
"scholar" has NOT been instantiated before you use it.


    Dim scholar As Student


    Dim scholar As New Student

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial