Heres the String I need to remove from:
Start: 29/09/2008 End: 29/09/2008
Heres the code that I've been messing with, and I just get myself confused, very quickly
vb Code:
Dim DRow As DataRow = DS.Tables(0).Rows(.cmbEditEvents.SelectedIndex) 'Start: 00/00/0000 End: 00/00/0000 Dim SRemoveLen1 As Integer = DRow.Item("Date (D/M/Y)").ToString.IndexOf(":") + 1 Dim ERemoveLen1 As Integer = DRow.Item("Date (D/M/Y)").ToString.LastIndexOf(":") + 1 Dim LenghtofString As Integer = Len(DRow.Item("Date (D/M/Y)")) Dim StartRange As String = DRow.Item("Date (D/M/Y)").ToString.Remove(0, SRemoveLen1) Dim SRemoveLen2 As Integer = StartRange.IndexOf("E") Dim EndRange As String = DRow.Item("Date (D/M/Y)").ToString.Remove(SRemoveLen2, LenghtofString - SRemoveLen2) MsgBox(EndRange)
What I'm trying to do is
set StartRange to 29/09/2008
and EndRange to 29/09/2008
then I can use the .SelectionRange.Start & .SelectionRange.End on the Month Cal to set the Selection Range.




Reply With Quote