Click here to Skip to main content
15,914,109 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Dynamically build excel worksheet with VSTO2005 problem Pin
Dave Kreskowiak23-Nov-07 4:50
mveDave Kreskowiak23-Nov-07 4:50 
GeneralRe: Dynamically build excel worksheet with VSTO2005 problem Pin
epetri23-Nov-07 9:04
epetri23-Nov-07 9:04 
QuestionRichTextBox Lines(0) Remove does not work Pin
ESTAN22-Nov-07 22:52
ESTAN22-Nov-07 22:52 
AnswerRe: RichTextBox Lines(0) Remove does not work Pin
Luc Pattyn23-Nov-07 1:30
sitebuilderLuc Pattyn23-Nov-07 1:30 
QuestionProblem in Integer array in VB.net Pin
kokilaB22-Nov-07 22:46
kokilaB22-Nov-07 22:46 
AnswerRe: Problem in Integer array in VB.net Pin
SHatchard22-Nov-07 23:32
SHatchard22-Nov-07 23:32 
AnswerRe: Problem in Integer array in VB.net Pin
Dave Kreskowiak23-Nov-07 4:46
mveDave Kreskowiak23-Nov-07 4:46 
QuestionObject reference not set to an instance of an object.+ Sourabh Pin
Dot Net Jantu22-Nov-07 22:03
Dot Net Jantu22-Nov-07 22:03 
Hi,
Kindly see the codes below:
On the next button I call ShowReconcileStatement.
In ShowReconcileStatement I call GetGridTotal.
When I call the GetGridTotal, Before it enters the procedure, I get an exception as : Object reference not set to an instance of an object. The code where the exception occurs I have underlined.


Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
Try
tcBankReco.SelectedIndex = 1
ShowReconcileStatement()
Catch ex As Exception
End Try
End Sub

Private Sub ShowReconcileStatement()
Try
Dim i As Integer
Dim bnkDep As Double = 0
Dim bnkWith As Double = 0
bnkWith = GetGridTotal(dgtmp, dgtmp.Cols(WITHDRAWLS).Index)
bnkDep = GetGridTotal(dgtmp, dgtmp.Cols(DEPOSITS).Index)
Catch ex As Exception
End Try
End Sub

Private Function GetGridTotal(ByVal dg As C1.Win.C1FlexGrid.C1FlexGrid, ByVal col As Int16) As Double
Try
With dg
Dim rg As CellRange = .GetCellRange(1, col, dg.Rows.Count - 1, col)
Dim agg As String = .Aggregate(AggregateEnum.Sum, rg)
Return CDbl(agg)
End With
Catch ex As Exception
Return 0
ShowMessage(ex.Message, 30)
Finally
End Try
End Function

Please suggest..




Thanks and Regards,

AnswerRe: Object reference not set to an instance of an object.+ Sourabh Pin
Mustafa Ismail Mustafa23-Nov-07 0:09
Mustafa Ismail Mustafa23-Nov-07 0:09 
AnswerRe: Object reference not set to an instance of an object.+ Sourabh Pin
Dave Kreskowiak23-Nov-07 4:37
mveDave Kreskowiak23-Nov-07 4:37 
Questionhow to get the DateTime value of a remote mahine Pin
georgegarvasis22-Nov-07 21:07
georgegarvasis22-Nov-07 21:07 
AnswerRe: how to get the DateTime value of a remote mahine Pin
epetri23-Nov-07 3:43
epetri23-Nov-07 3:43 
Questionan unhandled exception of type 'System.ExecutionEngineException' occured in crdb_adoplus.dll Pin
jhyn22-Nov-07 20:23
jhyn22-Nov-07 20:23 
AnswerRe: an unhandled exception of type 'System.ExecutionEngineException' occured in crdb_adoplus.dll Pin
Dave Kreskowiak23-Nov-07 4:33
mveDave Kreskowiak23-Nov-07 4:33 
QuestionHow to open a word file from a web site folder? Pin
arslanjatt22-Nov-07 20:05
arslanjatt22-Nov-07 20:05 
AnswerRe: How to open a word file from a web site folder? Pin
Vasudevan Deepak Kumar23-Nov-07 1:51
Vasudevan Deepak Kumar23-Nov-07 1:51 
Questionhow to trace the control key in datagridview Pin
eyes200722-Nov-07 19:25
eyes200722-Nov-07 19:25 
AnswerRe: how to trace the control key in datagridview Pin
Dave Kreskowiak23-Nov-07 4:30
mveDave Kreskowiak23-Nov-07 4:30 
QuestionHow to IMMEDIATELY terminate a background thread? Pin
alexvw22-Nov-07 17:10
alexvw22-Nov-07 17:10 
AnswerRe: How to IMMEDIATELY terminate a background thread? Pin
Nilesh Hapse22-Nov-07 19:47
Nilesh Hapse22-Nov-07 19:47 
GeneralRe: How to IMMEDIATELY terminate a background thread? Pin
alexvw23-Nov-07 2:26
alexvw23-Nov-07 2:26 
GeneralRe: How to IMMEDIATELY terminate a background thread? Pin
Dave Kreskowiak23-Nov-07 4:24
mveDave Kreskowiak23-Nov-07 4:24 
GeneralThank you gentlemen for your insight. Pin
alexvw23-Nov-07 12:48
alexvw23-Nov-07 12:48 
QuestionHelp with GridView and Binding Data [modified] Pin
Fergal8322-Nov-07 15:05
Fergal8322-Nov-07 15:05 
AnswerRe: Help with GridView and Binding Data Pin
Michael Sync22-Nov-07 16:07
Michael Sync22-Nov-07 16:07 

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.