Click here to Skip to main content
15,896,154 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to read contents of a Doc File? Pin
Christian Graus7-Jan-07 22:51
protectorChristian Graus7-Jan-07 22:51 
QuestionOutlook Security Pin
Member 32788137-Jan-07 20:56
Member 32788137-Jan-07 20:56 
AnswerRe: Outlook Security Pin
Kevin McFarlane9-Jan-07 10:21
Kevin McFarlane9-Jan-07 10:21 
Questionhow to start a .net application after creating html pages Pin
Member 37031417-Jan-07 20:24
Member 37031417-Jan-07 20:24 
Questionsimulating a click on slelected item in a listbox Pin
DannyHersh7-Jan-07 19:46
DannyHersh7-Jan-07 19:46 
AnswerRe: simulating a click on slelected item in a listbox Pin
CPallini7-Jan-07 20:29
mveCPallini7-Jan-07 20:29 
GeneralRe: simulating a click on slelected item in a listbox Pin
DannyHersh7-Jan-07 23:05
DannyHersh7-Jan-07 23:05 
QuestionObject variable or With block variable not set. Pin
thedom27-Jan-07 16:23
thedom27-Jan-07 16:23 
Hi

can someone tell me what wrong with my code i get the nullreference exception I know its something obvious but still new to .net

here is the code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
MsgBox(Spot(0).ToString)
End Sub


Function Spot() As Array

Dim ObjArray As Array
ObjArray = Nothing

Dim Obj1 As New Object
Dim Obj2 As New Object
Dim Obj3 As New Object

Obj1 = "Hello World"
Obj2 = 69
Obj3 = False

ObjArray(0) = Obj1 <-this is where the null reference is getting thrown
ObjArray(1) = Obj2
ObjArray(2) = Obj3

Return ObjArray

End Function


thanks everyone =)
AnswerRe: Object variable or With block variable not set. Pin
Christian Graus7-Jan-07 16:52
protectorChristian Graus7-Jan-07 16:52 
GeneralRe: Object variable or With block variable not set. Pin
thedom27-Jan-07 17:15
thedom27-Jan-07 17:15 
GeneralRe: Object variable or With block variable not set. Pin
thedom27-Jan-07 18:23
thedom27-Jan-07 18:23 
GeneralRe: Object variable or With block variable not set. Pin
Christian Graus7-Jan-07 20:22
protectorChristian Graus7-Jan-07 20:22 
GeneralRe: Object variable or With block variable not set. Pin
CPallini7-Jan-07 20:50
mveCPallini7-Jan-07 20:50 
AnswerRe: Object variable or With block variable not set. [modified] Pin
Walter_H8-Jan-07 1:55
Walter_H8-Jan-07 1:55 
GeneralRe: Object variable or With block variable not set. Pin
thedom28-Jan-07 20:41
thedom28-Jan-07 20:41 
Questionabout Stream and seek operations! Pin
dSolariuM7-Jan-07 9:59
dSolariuM7-Jan-07 9:59 
AnswerRe: about Stream and seek operations! Pin
Ed.Poore7-Jan-07 12:08
Ed.Poore7-Jan-07 12:08 
QuestionLaunch a vb.net application from “Windows Explorer” context menu. Pin
R Britz7-Jan-07 9:08
R Britz7-Jan-07 9:08 
Questiondata is not saved to sql2005 in vb.net2005 Pin
ramugaru7-Jan-07 4:55
ramugaru7-Jan-07 4:55 
AnswerRe: data is not saved to sql2005 in vb.net2005 Pin
Ed.Poore7-Jan-07 6:12
Ed.Poore7-Jan-07 6:12 
QuestionWebBrowser VB.NET Pin
imatureStudent7-Jan-07 1:01
imatureStudent7-Jan-07 1:01 
AnswerRe: WebBrowser VB.NET Pin
MatrixCoder7-Jan-07 6:24
MatrixCoder7-Jan-07 6:24 
AnswerRe: WebBrowser VB.NET Pin
tmaxwell077-Jan-07 6:51
tmaxwell077-Jan-07 6:51 
GeneralRe: WebBrowser VB.NET Pin
imatureStudent8-Jan-07 3:15
imatureStudent8-Jan-07 3:15 
QuestionVisual Basic declaring of Variables Pin
Cereel6-Jan-07 20:56
Cereel6-Jan-07 20:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.