Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

how to validate date time picker and combobox

Posted on 2014-12-04
10
178 Views
Last Modified: 2014-12-05
code to create a validation for selected combo box is not working any suggestions.

  Private Sub COBTermType1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles COBTermType1.Leave

        If COBTermType1.SelectedIndex = -1 Then
            MessageBox.Show("select item from combobox")
        End If
    End Sub

error message (see picture) appears error message
Imports System.Data
Imports System.Data.SqlClient
Imports Excel = Microsoft.Office.Interop.Excel

Public Class Form1
    Private Const connectionString As String = "Data Source=mddbsqlpfqa.loe.corp; Database=PowerFaids; " _
& "Trusted_Connection=Yes;"

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DTPTerm1.Format = DateTimePickerFormat.Custom
        DTPTerm1.CustomFormat = " "
        DTPTerm2.Format = DateTimePickerFormat.Custom
        DTPTerm2.CustomFormat = " "
        DTPTerm3.Format = DateTimePickerFormat.Custom
        DTPTerm3.CustomFormat = " "
        DTPTerm4.Format = DateTimePickerFormat.Custom
        DTPTerm4.CustomFormat = " "
        DTPTerm5.Format = DateTimePickerFormat.Custom
        DTPTerm5.CustomFormat = " "
        DTPTerm6.Format = DateTimePickerFormat.Custom
        DTPTerm6.CustomFormat = " "
    End Sub

    Private Sub DTPTerm1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DTPTerm1.ValueChanged
        DTPTerm1.CustomFormat = "MM/dd/yyyy"
    End Sub

    Private Sub DTPTerm2_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DTPTerm2.ValueChanged
        DTPTerm2.CustomFormat = "MM/dd/yyyy"
    End Sub

    Private Sub DTPTerm3_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DTPTerm3.ValueChanged
        DTPTerm3.CustomFormat = "MM/dd/yyyy"
    End Sub

    Private Sub DTPTerm4_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DTPTerm4.ValueChanged
        DTPTerm4.CustomFormat = "MM/dd/yyyy"
    End Sub

    Private Sub DTPTerm5_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DTPTerm5.ValueChanged
        DTPTerm5.CustomFormat = "MM/dd/yyyy"
    End Sub

    Private Sub DTPTerm6_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DTPTerm6.ValueChanged
        DTPTerm6.CustomFormat = "MM/dd/yyyy"
    End Sub

    

    Private Sub CreateWorksheet(ByVal sheetName As String, ByVal colorTab As Excel.XlColorIndex, ByVal termStartDate As Date, ByVal termTypeFull As String, ByVal tableStyle As String, ByRef xlSht As Excel.Worksheet)
        xlSht.Activate()
        xlSht.Name = sheetName
        xlSht.Tab.ColorIndex = colorTab

        Using cnn As New SqlConnection(connectionString)
            cnn.Open()

            'Run SQL'
            Using mysda As New SqlDataAdapter()

                Using mycmd As New SqlCommand(My.Resources.SQL_new_student_metric, cnn)

                    mycmd.CommandTimeout = 0
                    mycmd.Parameters.AddWithValue("@PROGRAM_START", termStartDate)
                    mycmd.Parameters.AddWithValue("@TERM_TYPE", termTypeFull.Substring(0, 1))
                    mysda.SelectCommand = mycmd

                    Using ds As New DataSet

                        mysda.Fill(ds)

                        'Display Headers, Columns, and Rows'

                        For i = 0 To ds.Tables(0).Columns.Count - 1
                            xlSht.Cells(1, i + 1) = ds.Tables(0).Columns(i).ToString()
                        Next
                        For i = 0 To ds.Tables(0).Rows.Count - 1
                            For j = 0 To ds.Tables(0).Columns.Count - 1
                                xlSht.Cells(i + 2, j + 1) = _
                                ds.Tables(0).Rows(i).Item(j)
                            Next
                        Next

                        'Format Table'

                        xlSht.ListObjects.Add(Excel.XlListObjectSourceType.xlSrcRange, xlSht.UsedRange, , Excel.XlYesNoGuess.xlYes).Name = "Table1"
                        xlSht.ListObjects("Table1").TableStyle = tableStyle

                        '~~> Create Borders
                        With xlSht.UsedRange

                            With .Borders(Excel.XlBordersIndex.xlEdgeLeft)
                                .LineStyle = Excel.XlLineStyle.xlDouble
                                .ColorIndex = 0
                                .TintAndShade = 0
                                .Weight = Excel.XlBorderWeight.xlThin
                            End With

                            With .Borders(Excel.XlBordersIndex.xlEdgeTop)
                                .LineStyle = Excel.XlLineStyle.xlContinuous
                                .ColorIndex = 0
                                .TintAndShade = 0
                                .Weight = Excel.XlBorderWeight.xlThin
                            End With
                            With .Borders(Excel.XlBordersIndex.xlEdgeBottom)
                                .LineStyle = Excel.XlLineStyle.xlContinuous
                                .ColorIndex = 0
                                .TintAndShade = 0
                                .Weight = Excel.XlBorderWeight.xlThin
                            End With
                            With .Borders(Excel.XlBordersIndex.xlEdgeRight)
                                .LineStyle = Excel.XlLineStyle.xlContinuous
                                .ColorIndex = 0
                                .TintAndShade = 0
                                .Weight = Excel.XlBorderWeight.xlThin
                            End With
                            With .Borders(Excel.XlBordersIndex.xlInsideVertical)
                                .LineStyle = Excel.XlLineStyle.xlContinuous
                                .ColorIndex = 0
                                .TintAndShade = 0
                                .Weight = Excel.XlBorderWeight.xlThin
                            End With
                            With .Borders(Excel.XlBordersIndex.xlInsideHorizontal)
                                .LineStyle = Excel.XlLineStyle.xlContinuous
                                .ColorIndex = 0
                                .TintAndShade = 0
                                .Weight = Excel.XlBorderWeight.xlThin
                            End With
                        End With

                        xlSht.Columns.AutoFit()

                    End Using
                End Using

            End Using

        End Using
    End Sub

    Private Sub COBTermType1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles COBTermType1.Leave

        If COBTermType1.SelectedIndex = -1 Then
            MessageBox.Show("select item from combobox")
        End If
    End Sub


    Private Sub btnCreateReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateReport.Click

        Dim xlApp As Excel.Application
        Dim xlWorkBook As Excel.Workbook
        Dim xlSheet6 As Excel.Worksheet
        Dim xlSheet5 As Excel.Worksheet
        Dim xlSheet4 As Excel.Worksheet
        Dim xlSheet1 As Excel.Worksheet
        Dim xlSheet2 As Excel.Worksheet
        Dim xlSheet3 As Excel.Worksheet
        Dim xlSheet7 As Excel.Worksheet
        Dim misValue As Object = System.Reflection.Missing.Value

        'For Excel Functions'

        Dim termStart1 As String
        Dim termStart2 As String
        Dim termStart3 As String
        Dim termStart4 As String
        Dim termStart5 As String
        Dim termStart6 As String


        termStart1 = DTPTerm1.Value.ToString("MM-dd-yyyy") & " " & COBTermType1.SelectedItem.ToString(0)
        termStart2 = DTPTerm2.Value.ToString("MM-dd-yyyy") & " " & COBTermType2.SelectedItem.ToString(0)
        termStart3 = DTPTerm3.Value.ToString("MM-dd-yyyy") & " " & COBTermType3.SelectedItem.ToString(0)
        termStart4 = DTPTerm4.Value.ToString("MM-dd-yyyy") & " " & COBTermType4.SelectedItem.ToString(0)
        termStart5 = DTPTerm5.Value.ToString("MM-dd-yyyy") & " " & COBTermType5.SelectedItem.ToString(0)
        termStart6 = DTPTerm6.Value.ToString("MM-dd-yyyy") & " " & COBTermType6.SelectedItem.ToString(0)




        xlApp = New Excel.ApplicationClass
        xlWorkBook = xlApp.Workbooks.Add(misValue)

        xlWorkBook.Sheets.Add(, , 4)
        'xlApp.Visible = True

        'Create and run each worksheet'

        xlSheet6 = CType(xlWorkBook.Worksheets("Sheet6"), Excel.Worksheet)
        CreateWorksheet(termStart1, CType(3, Excel.XlColorIndex), DTPTerm1.Value, CStr(COBTermType1.SelectedItem), "TableStyleMedium2", xlSheet6)

        ''NAME EXCEL SHEET 2''
        xlSheet5 = CType(xlWorkBook.Worksheets("Sheet5"), Excel.Worksheet)
        CreateWorksheet(termStart2, CType(6, Excel.XlColorIndex), DTPTerm2.Value, CStr(COBTermType2.SelectedItem), "TableStyleMedium4", xlSheet5)

        ''NAME EXCEL SHEET 3''
        xlSheet4 = CType(xlWorkBook.Worksheets("Sheet4"), Excel.Worksheet)
        CreateWorksheet(termStart3, CType(9, Excel.XlColorIndex), DTPTerm3.Value, CStr(COBTermType3.SelectedItem), "TableStyleMedium1", xlSheet4)

        ''NAME EXCEL SHEET 4''
        xlSheet1 = CType(xlWorkBook.Worksheets("Sheet1"), Excel.Worksheet)
        CreateWorksheet(termStart4, CType(29, Excel.XlColorIndex), DTPTerm4.Value, CStr(COBTermType4.SelectedItem), "TableStyleMedium3", xlSheet1)

        ''NAME EXCEL SHEET 5''
        xlSheet2 = CType(xlWorkBook.Worksheets("Sheet2"), Excel.Worksheet)
        CreateWorksheet(termStart5, CType(12, Excel.XlColorIndex), DTPTerm5.Value, CStr(COBTermType5.SelectedItem), "TableStyleMedium7", xlSheet2)

        ''NAME EXCEL SHEET 6''
        xlSheet3 = CType(xlWorkBook.Worksheets("Sheet3"), Excel.Worksheet)
        CreateWorksheet(termStart6, CType(22, Excel.XlColorIndex), DTPTerm6.Value, CStr(COBTermType6.SelectedItem), "TableStyleMedium9", xlSheet3)

        ''NAME EXCEL SHEET 7''
        xlSheet7 = CType(xlWorkBook.Worksheets("Sheet7"), Excel.Worksheet)
        xlSheet7.Activate()
        xlSheet7.Name = "Summary"
        xlSheet7.Tab.ColorIndex = CType(14, Excel.XlColorIndex)

        xlSheet7.Range("A1").Value = "Summary of ISIRs Received for Admitted Students"
        xlSheet7.Range("A1").Font.Size = 14

        With xlSheet7

            .Range("B3").Value = termStart1
            .Range("F3").Value = termStart2
            .Range("J3").Value = termStart3
            .Range("B22").Value = termStart4
            .Range("F22").Value = termStart5
            .Range("J22").Value = termStart6
            .Range("B4, F4, J4, B23, F23, J23").Value = "Status"
            .Range("B5, F5, J5, B24, F24, J24").Value = "Incomplete"
            .Range("B6, F6, J6, B25, F25, J25").Value = "Ready To Package - Special Processing"
            .Range("B7, F7, J7, B26, F26, J26").Value = "Ready To Package"
            .Range("B8, F8, J8, B27, F27, J27").Value = "Awarded"
            .Range("B9, F9, J9, B28, F28, J28").Value = "Declined Aid"
            .Range("B10, F10, J10, B29, F29, J29").Value = "Not Eligible"
            .Range("B11, F11, J11, B30, F30, J30").Value = "Inactive Awarded"
            .Range("B12, F12, J12, B31, F31, J31").Value = "Inactive Not Awarded"
            .Range("B13, F13, J13, B32, F32, J32, B20, F20, J20, B39, F39, J39").Value = "Total"
            .Range("B15, F15, J15, B34, F34, J34").Value = "Active Students Days RP"
            .Range("B16, F16, J16, B35, F35, J35").Value = "0 - 7"
            .Range("B17, F17, J17, B36, F36, J36").Value = "'8 - 14"
            .Range("B18, F18, J18, B37, F37, J37").Value = "15 - 21"
            .Range("B19, F19, J19, B38, F38, J38").Value = "22+"
            .Range("C4, G4, K4, C23, G23, K23, C15, G15, K15, C34, G34, K34").Value = "Students"
            .Range("D4, H4, L4, D23, H23, L23, D15, H15, L15, D34, H34, L34").Value = "Percent"

            .Range("C5").Formula = "=COUNTIFS('" & termStart1 & "'!$D:$D,""IP"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")+(COUNTIFS('" & termStart1 & "'!$D:$D,""ID"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS""))"
            .Range("C6").Formula = "=COUNTIFS('" & termStart1 & "'!$D:$D,""DM"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart1 & "'!$D:$D,""AW"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C7").Formula = "=COUNTIFS('" & termStart1 & "'!$D:$D,""RP"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C8").Formula = "=COUNTIFS('" & termStart1 & "'!$E:$E,""Y"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C9").Formula = "=COUNTIFS('" & termStart1 & "'!$D:$D,""DA"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C10").Formula = "=COUNTIFS('" & termStart1 & "'!$D:$D,""DS"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart1 & "'!$D:$D,""HL"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart1 & "'!$D:$D,""NA"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart1 & "'!$D:$D,""RD"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart1 & "'!$D:$D,""SC"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart1 & "'!$D:$D,""AR"",'" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C11").Formula = "=COUNTIFS('" & termStart1 & "'!$E:$E,""Y"",'" & termStart1 & "'!$H:$H,""IS"")"
            .Range("C12").Formula = "=COUNTIFS('" & termStart1 & "'!$E:$E,""N"",'" & termStart1 & "'!$H:$H,""IS"")"
            .Range("C13").Formula = "=SUM(C5:C12)"
            .Range("C16").Formula = "=COUNTIFS('" & termStart1 & "'!$F:$F,"">=0"",'" & termStart1 & "'!$F:$F,""<8"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C17").Formula = "=COUNTIFS('" & termStart1 & "'!$F:$F,"">=8"",'" & termStart1 & "'!$F:$F,""<15"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C18").Formula = "=COUNTIFS('" & termStart1 & "'!$F:$F,"">=15"",'" & termStart1 & "'!$F:$F,""<22"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C19").Formula = "=COUNTIFS('" & termStart1 & "'!$F:$F,"">=22"",'" & termStart1 & "'!$H:$H,""<>IS"")"
            .Range("C20").Formula = "=SUM(C16:C19)"

            .Range("G5").Formula = "=COUNTIFS('" & termStart2 & "'!$D:$D,""IP"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")+(COUNTIFS('" & termStart2 & "'!$D:$D,""ID"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS""))"
            .Range("G6").Formula = "=COUNTIFS('" & termStart2 & "'!$D:$D,""DM"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart2 & "'!$D:$D,""AW"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G7").Formula = "=COUNTIFS('" & termStart2 & "'!$D:$D,""RP"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G8").Formula = "=COUNTIFS('" & termStart2 & "'!$E:$E,""Y"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G9").Formula = "=COUNTIFS('" & termStart2 & "'!$D:$D,""DA"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G10").Formula = "=COUNTIFS('" & termStart2 & "'!$D:$D,""DS"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart2 & "'!$D:$D,""HL"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart2 & "'!$D:$D,""NA"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart2 & "'!$D:$D,""RD"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart2 & "'!$D:$D,""SC"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart2 & "'!$D:$D,""AR"",'" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G11").Formula = "=COUNTIFS('" & termStart2 & "'!$E:$E,""Y"",'" & termStart2 & "'!$H:$H,""IS"")"
            .Range("G12").Formula = "=COUNTIFS('" & termStart2 & "'!$E:$E,""N"",'" & termStart2 & "'!$H:$H,""IS"")"
            .Range("G13").Formula = "=SUM(G5:G12)"
            .Range("G16").Formula = "=COUNTIFS('" & termStart2 & "'!$F:$F,"">=0"",'" & termStart2 & "'!$F:$F,""<8"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G17").Formula = "=COUNTIFS('" & termStart2 & "'!$F:$F,"">=8"",'" & termStart2 & "'!$F:$F,""<15"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G18").Formula = "=COUNTIFS('" & termStart2 & "'!$F:$F,"">=15"",'" & termStart2 & "'!$F:$F,""<22"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G19").Formula = "=COUNTIFS('" & termStart2 & "'!$F:$F,"">=22"",'" & termStart2 & "'!$H:$H,""<>IS"")"
            .Range("G20").Formula = "=SUM(G16:G19)"

            .Range("K5").Formula = "=COUNTIFS('" & termStart3 & "'!$D:$D,""IP"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")+(COUNTIFS('" & termStart3 & "'!$D:$D,""ID"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS""))"
            .Range("K6").Formula = "=COUNTIFS('" & termStart3 & "'!$D:$D,""DM"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart3 & "'!$D:$D,""AW"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K7").Formula = "=COUNTIFS('" & termStart3 & "'!$D:$D,""RP"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K8").Formula = "=COUNTIFS('" & termStart3 & "'!$E:$E,""Y"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K9").Formula = "=COUNTIFS('" & termStart3 & "'!$D:$D,""DA"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K10").Formula = "=COUNTIFS('" & termStart3 & "'!$D:$D,""DS"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart3 & "'!$D:$D,""HL"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart3 & "'!$D:$D,""NA"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart3 & "'!$D:$D,""RD"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart3 & "'!$D:$D,""SC"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart3 & "'!$D:$D,""AR"",'" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K11").Formula = "=COUNTIFS('" & termStart3 & "'!$E:$E,""Y"",'" & termStart3 & "'!$H:$H,""IS"")"
            .Range("K12").Formula = "=COUNTIFS('" & termStart3 & "'!$E:$E,""N"",'" & termStart3 & "'!$H:$H,""IS"")"
            .Range("K13").Formula = "=SUM(K5:K12)"
            .Range("K16").Formula = "=COUNTIFS('" & termStart3 & "'!$F:$F,"">=0"",'" & termStart3 & "'!$F:$F,""<8"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K17").Formula = "=COUNTIFS('" & termStart3 & "'!$F:$F,"">=8"",'" & termStart3 & "'!$F:$F,""<15"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K18").Formula = "=COUNTIFS('" & termStart3 & "'!$F:$F,"">=15"",'" & termStart3 & "'!$F:$F,""<22"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K19").Formula = "=COUNTIFS('" & termStart3 & "'!$F:$F,"">=22"",'" & termStart3 & "'!$H:$H,""<>IS"")"
            .Range("K20").Formula = "=SUM(K16:K19)"

            .Range("C24").Formula = "=COUNTIFS('" & termStart4 & "'!$D:$D,""IP"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")+(COUNTIFS('" & termStart4 & "'!$D:$D,""ID"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS""))"
            .Range("C25").Formula = "=COUNTIFS('" & termStart4 & "'!$D:$D,""DM"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart4 & "'!$D:$D,""AW"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C26").Formula = "=COUNTIFS('" & termStart4 & "'!$D:$D,""RP"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C27").Formula = "=COUNTIFS('" & termStart4 & "'!$E:$E,""Y"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C28").Formula = "=COUNTIFS('" & termStart4 & "'!$D:$D,""DA"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C29").Formula = "=COUNTIFS('" & termStart4 & "'!$D:$D,""DS"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart4 & "'!$D:$D,""HL"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart4 & "'!$D:$D,""NA"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart4 & "'!$D:$D,""RD"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart4 & "'!$D:$D,""SC"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart4 & "'!$D:$D,""AR"",'" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C30").Formula = "=COUNTIFS('" & termStart4 & "'!$E:$E,""Y"",'" & termStart4 & "'!$H:$H,""IS"")"
            .Range("C31").Formula = "=COUNTIFS('" & termStart4 & "'!$E:$E,""N"",'" & termStart4 & "'!$H:$H,""IS"")"
            .Range("C32").Formula = "=SUM(C24:C31)"
            .Range("C35").Formula = "=COUNTIFS('" & termStart4 & "'!$F:$F,"">=0"",'" & termStart4 & "'!$F:$F,""<8"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C36").Formula = "=COUNTIFS('" & termStart4 & "'!$F:$F,"">=8"",'" & termStart4 & "'!$F:$F,""<15"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C37").Formula = "=COUNTIFS('" & termStart4 & "'!$F:$F,"">=15"",'" & termStart4 & "'!$F:$F,""<22"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C38").Formula = "=COUNTIFS('" & termStart4 & "'!$F:$F,"">=22"",'" & termStart4 & "'!$H:$H,""<>IS"")"
            .Range("C39").Formula = "=SUM(C35:C38)"

            .Range("G24").Formula = "=COUNTIFS('" & termStart5 & "'!$D:$D,""IP"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")+(COUNTIFS('" & termStart5 & "'!$D:$D,""ID"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS""))"
            .Range("G25").Formula = "=COUNTIFS('" & termStart5 & "'!$D:$D,""DM"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart5 & "'!$D:$D,""AW"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G26").Formula = "=COUNTIFS('" & termStart5 & "'!$D:$D,""RP"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G27").Formula = "=COUNTIFS('" & termStart5 & "'!$E:$E,""Y"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G28").Formula = "=COUNTIFS('" & termStart5 & "'!$D:$D,""DA"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G29").Formula = "=COUNTIFS('" & termStart5 & "'!$D:$D,""DS"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart5 & "'!$D:$D,""HL"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart5 & "'!$D:$D,""NA"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart5 & "'!$D:$D,""RD"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart5 & "'!$D:$D,""SC"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart5 & "'!$D:$D,""AR"",'" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G30").Formula = "=COUNTIFS('" & termStart5 & "'!$E:$E,""Y"",'" & termStart5 & "'!$H:$H,""IS"")"
            .Range("G31").Formula = "=COUNTIFS('" & termStart5 & "'!$E:$E,""N"",'" & termStart5 & "'!$H:$H,""IS"")"
            .Range("G32").Formula = "=SUM(G24:G31)"
            .Range("G35").Formula = "=COUNTIFS('" & termStart5 & "'!$F:$F,"">=0"",'" & termStart5 & "'!$F:$F,""<8"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G36").Formula = "=COUNTIFS('" & termStart5 & "'!$F:$F,"">=8"",'" & termStart5 & "'!$F:$F,""<15"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G37").Formula = "=COUNTIFS('" & termStart5 & "'!$F:$F,"">=15"",'" & termStart5 & "'!$F:$F,""<22"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G38").Formula = "=COUNTIFS('" & termStart5 & "'!$F:$F,"">=22"",'" & termStart5 & "'!$H:$H,""<>IS"")"
            .Range("G39").Formula = "=SUM(G35:G38)"

            .Range("K24").Formula = "=COUNTIFS('" & termStart6 & "'!$D:$D,""IP"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")+(COUNTIFS('" & termStart6 & "'!$D:$D,""ID"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS""))"
            .Range("K25").Formula = "=COUNTIFS('" & termStart6 & "'!$D:$D,""DM"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart6 & "'!$D:$D,""AW"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K26").Formula = "=COUNTIFS('" & termStart6 & "'!$D:$D,""RP"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K27").Formula = "=COUNTIFS('" & termStart6 & "'!$E:$E,""Y"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K28").Formula = "=COUNTIFS('" & termStart6 & "'!$D:$D,""DA"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K29").Formula = "=COUNTIFS('" & termStart6 & "'!$D:$D,""DS"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart6 & "'!$D:$D,""HL"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart6 & "'!$D:$D,""NA"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart6 & "'!$D:$D,""RD"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart6 & "'!$D:$D,""SC"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")+COUNTIFS('" & termStart6 & "'!$D:$D,""AR"",'" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K30").Formula = "=COUNTIFS('" & termStart6 & "'!$E:$E,""Y"",'" & termStart6 & "'!$H:$H,""IS"")"
            .Range("K31").Formula = "=COUNTIFS('" & termStart6 & "'!$E:$E,""N"",'" & termStart6 & "'!$H:$H,""IS"")"
            .Range("K32").Formula = "=SUM(K24:K31)"
            .Range("K35").Formula = "=COUNTIFS('" & termStart6 & "'!$F:$F,"">=0"",'" & termStart6 & "'!$F:$F,""<8"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K36").Formula = "=COUNTIFS('" & termStart6 & "'!$F:$F,"">=8"",'" & termStart6 & "'!$F:$F,""<15"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K37").Formula = "=COUNTIFS('" & termStart6 & "'!$F:$F,"">=15"",'" & termStart6 & "'!$F:$F,""<22"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K38").Formula = "=COUNTIFS('" & termStart6 & "'!$F:$F,"">=22"",'" & termStart6 & "'!$H:$H,""<>IS"")"
            .Range("K39").Formula = "=SUM(K35:K38)"

            .Range("D5").Formula = "=C5/C$13"
            .Range("D6").Formula = "=C6/C$13"
            .Range("D7").Formula = "=C7/C$13"
            .Range("D8").Formula = "=C8/C$13"
            .Range("D9").Formula = "=C9/C$13"
            .Range("D10").Formula = "=C10/C$13"
            .Range("D11").Formula = "=C11/C$13"
            .Range("D12").Formula = "=C12/C$13"
            .Range("D16").Formula = "=C16/C$20"
            .Range("D17").Formula = "=C17/C$20"
            .Range("D18").Formula = "=C18/C$20"
            .Range("D19").Formula = "=C19/C$20"

            .Range("H5").Formula = "=G5/G$13"
            .Range("H6").Formula = "=G6/G$13"
            .Range("H7").Formula = "=G7/G$13"
            .Range("H8").Formula = "=G8/G$13"
            .Range("H9").Formula = "=G9/G$13"
            .Range("H10").Formula = "=G10/G$13"
            .Range("H11").Formula = "=G11/G$13"
            .Range("H12").Formula = "=G12/G$13"
            .Range("H16").Formula = "=G16/G$20"
            .Range("H17").Formula = "=G17/G$20"
            .Range("H18").Formula = "=G18/G$20"
            .Range("H19").Formula = "=G19/G$20"

            .Range("L5").Formula = "=K5/K$13"
            .Range("L6").Formula = "=K6/K$13"
            .Range("L7").Formula = "=K7/K$13"
            .Range("L8").Formula = "=K8/K$13"
            .Range("L9").Formula = "=K9/K$13"
            .Range("L10").Formula = "=K10/K$13"
            .Range("L11").Formula = "=K11/K$13"
            .Range("L12").Formula = "=K12/K$13"
            .Range("L16").Formula = "=K16/K$20"
            .Range("L17").Formula = "=K17/K$20"
            .Range("L18").Formula = "=K18/K$20"
            .Range("L19").Formula = "=K19/K$20"

            .Range("D24").Formula = "=C24/C$32"
            .Range("D25").Formula = "=C25/C$32"
            .Range("D26").Formula = "=C26/C$32"
            .Range("D27").Formula = "=C27/C$32"
            .Range("D28").Formula = "=C28/C$32"
            .Range("D29").Formula = "=C29/C$32"
            .Range("D30").Formula = "=C30/C$32"
            .Range("D31").Formula = "=C31/C$32"
            .Range("D35").Formula = "=C35/C$39"
            .Range("D36").Formula = "=C36/C$39"
            .Range("D37").Formula = "=C37/C$39"
            .Range("D38").Formula = "=C38/C$39"

            .Range("H24").Formula = "=G24/G$32"
            .Range("H25").Formula = "=G25/G$32"
            .Range("H26").Formula = "=G26/G$32"
            .Range("H27").Formula = "=G27/G$32"
            .Range("H28").Formula = "=G28/G$32"
            .Range("H29").Formula = "=G29/G$32"
            .Range("H30").Formula = "=G30/G$32"
            .Range("H31").Formula = "=G31/G$32"
            .Range("H35").Formula = "=G35/G$39"
            .Range("H36").Formula = "=G36/G$39"
            .Range("H37").Formula = "=G37/G$39"
            .Range("H38").Formula = "=G38/G$39"

            .Range("L24").Formula = "=K24/K$32"
            .Range("L25").Formula = "=K25/K$32"
            .Range("L26").Formula = "=K26/K$32"
            .Range("L27").Formula = "=K27/K$32"
            .Range("L28").Formula = "=K28/K$32"
            .Range("L29").Formula = "=K29/K$32"
            .Range("L30").Formula = "=K30/K$32"
            .Range("L31").Formula = "=K31/K$32"
            .Range("L35").Formula = "=K35/K$39"
            .Range("L36").Formula = "=K36/K$39"
            .Range("L37").Formula = "=K37/K$39"
            .Range("L38").Formula = "=K38/K$39"

            .Range("D:D, H:H, L:L").NumberFormat = "0%"

            .Range("B5:D5, F5:H5, J5:L5, B24:D24, F24:H24, J24:L24").Interior.Color = RGB(255, 255, 204)
            .Range("B6:D6, F6:H6, J6:L6, B25:D25, F25:H25, J25:L25").Interior.Color = RGB(204, 255, 102)
            .Range("B7:D7, F7:H7, J7:L7, B26:D26, F26:H26, J26:L26").Interior.Color = RGB(153, 255, 153)
            .Range("B8:D8, F8:H8, J8:L8, B27:D27, F27:H27, J27:L27").Interior.Color = RGB(51, 204, 51)
            .Range("B9:D10, F9:H10, J9:L10, B28:D29, F28:H29, J28:L29").Interior.Color = RGB(0, 51, 0)
            .Range("B9:D10, F9:H10, J9:L10, B28:D29, F28:H29, J28:L29").Font.Color = RGB(255, 255, 255)
            .Range("B11:D12, F11:H12, J11:L12, B30:D31, F30:H31, J30:L31").Interior.Color = RGB(191, 191, 191)
            .Range("B16:D19, F16:H19, J16:L19, B35:D38, F35:H38, J35:L38").Interior.Color = RGB(153, 255, 153)

            .Range("A1:L1, B3:D3, F3:H3, J3:L3, B22:D22, F22:H22, J22:L22").Merge()
            .Range("A1:L1, B3:D3, F3:H3, J3:L3, B22:D22, F22:H22, J22:L22, B4, F4, J4, B23, F23, J23, B15, F15, J15, B34, F34, J34").HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter
            .Range("A1, B3, F3, J3, B22, F22, J22, B4, F4, J4, B23, F23, J23, B13, F13, J13, B32, F32, J32, B20, F20, J20, B39, F39, J39, B15, F15, J15, B34, F34, J34, C4, G4, K4, C23, G23, K23, C15, G15, K15, C34, G34, K34, C20, G20, K20, C39, G39, K39, D4, H4, L4").Font.Bold = True
            .Range("D23, H23, L23, D15, H15, L15, D34, H34, L34").Font.Bold = True

            With xlSheet7.Range("B3:D20, F3:H20, J3:L20, B22:D39, F22:H39, J22:L39")

                With .Borders(Excel.XlBordersIndex.xlEdgeLeft)
                    .LineStyle = Excel.XlLineStyle.xlDouble
                    .ColorIndex = 0
                    .TintAndShade = 0
                    .Weight = Excel.XlBorderWeight.xlMedium
                End With
                With .Borders(Excel.XlBordersIndex.xlEdgeTop)
                    .LineStyle = Excel.XlLineStyle.xlContinuous
                    .ColorIndex = 0
                    .TintAndShade = 0
                    .Weight = Excel.XlBorderWeight.xlMedium
                End With
                With .Borders(Excel.XlBordersIndex.xlEdgeBottom)
                    .LineStyle = Excel.XlLineStyle.xlContinuous
                    .ColorIndex = 0
                    .TintAndShade = 0
                    .Weight = Excel.XlBorderWeight.xlMedium
                End With
                With .Borders(Excel.XlBordersIndex.xlEdgeRight)
                    .LineStyle = Excel.XlLineStyle.xlContinuous
                    .ColorIndex = 0
                    .TintAndShade = 0
                    .Weight = Excel.XlBorderWeight.xlMedium
                End With

                With xlSheet7.Range("B3:D3, F3:H3, J3:L3, B22:D22, F22:H22, J22:L22")
                    With .Borders(Excel.XlBordersIndex.xlEdgeBottom)
                        .LineStyle = Excel.XlLineStyle.xlContinuous
                        .ColorIndex = 0
                        .TintAndShade = 0
                        .Weight = Excel.XlBorderWeight.xlThin
                    End With
                    With xlSheet7.Range("B14:D14, F14:H14, J14:L14, B33:D33, F33:H33, J33:L33")
                        With .Borders(Excel.XlBordersIndex.xlEdgeTop)
                            .LineStyle = Excel.XlLineStyle.xlContinuous
                            .ColorIndex = 0
                            .TintAndShade = 0
                            .Weight = Excel.XlBorderWeight.xlThin
                        End With
                        With .Borders(Excel.XlBordersIndex.xlEdgeBottom)
                            .LineStyle = Excel.XlLineStyle.xlContinuous
                            .ColorIndex = 0
                            .TintAndShade = 0
                            .Weight = Excel.XlBorderWeight.xlThin
                        End With
                    End With
                End With
            End With
        End With

        xlSheet7.Columns.AutoFit()
        xlApp.Visible = True

        releaseObject(xlSheet7)
        releaseObject(xlSheet6)
        releaseObject(xlSheet5)
        releaseObject(xlSheet4)
        releaseObject(xlSheet3)
        releaseObject(xlSheet2)
        releaseObject(xlSheet1)
        releaseObject(xlWorkBook)
        releaseObject(xlApp)

        MessageBox.Show("Report is complete")

    End Sub

    Private Sub releaseObject(ByVal obj As Object)
        Try
            System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
            obj = Nothing
        Catch ex As Exception
            obj = Nothing
        Finally
            GC.Collect()
        End Try
    End Sub


End Class

Open in new window

0
Comment
Question by:cmed
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 40482310
you have a null reference so the first thing that I'd do is check for null first.
   If COBTermType1.SelectedIndex = -1 Then

a selected index will either be NULL or an unsigned integer .. the index can't be a negative number AFAIK
0
 
LVL 15

Expert Comment

by:ChloesDad
ID: 40482351
In VB if no item is selected from a combo box the selected index will be -1, However the SelectedItem property will be Null.

You should check this in code
IF NOT COBTermType1.SelectedItem is Nothing then
  TermStart1 = ........
ELSE
  TermStart1 = "No Item Selected"
End If

Open in new window

0
 
LVL 20

Expert Comment

by:ElrondCT
ID: 40482735
The other option is to use the .Text property rather than .SelectedItem. This always returns a valid answer (assuming there are items in the list), even if the user doesn't select anything.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:cmed
ID: 40483035
I apologize in advance, but I want the application to close completely if the combo box is not selected.  I am not sure if I am putting the suggestion in the code correctly but it keeps having errors
0
 

Author Comment

by:cmed
ID: 40483141
I am still getting the error from the termStart1 (the name of the Excel Sheet) due to object reference not set to an instance of an object.
0
 
LVL 15

Expert Comment

by:ChloesDad
ID: 40483350
How does your code look after you added my suggestion, as it should not error if no item is selected. you would need to add it on every combobox.
0
 
LVL 20

Accepted Solution

by:
ElrondCT earned 500 total points
ID: 40483389
I'm sorry, I didn't follow your intent initially. You want to make sure that an item has been selected from the list before the worksheet is created. You have two choices:

1) In the COBTermType1_Leave event handler, you can add

      COBTermType1.Focus()

immediately after you display the MessageBox. This will prevent the user from leaving that combobox until he's selected something. This could be a bit annoying to someone who wants to cancel out; you'll have to decide if that's a concern.

2) At the start of the btnCreateReport_Click event handler, check to see if an item has been selected. This is better than #1 because it also covers situations where someone never entered the combobox.
If COBTermType1.SelectedItem is Nothing then
    MessageBox.Show("Please select a term type.")
    Return
End If

Open in new window

0
 

Author Comment

by:cmed
ID: 40483524
@ElrondCT  The second condition works great, but it does not work for the datetimepicker because there is a pre selected value, so i am trying to think of a condition to make the user choose a date. Thanks  for the help

@ChloesDad I am not sure where I went wrong because I use the code and I was still getting the same error message about the object.  Thanks for the help.
0
 

Author Comment

by:cmed
ID: 40483615
can you give your user the option of using the drop down or type in date in date time picker
0
 
LVL 20

Expert Comment

by:ElrondCT
ID: 40483749
The only way I can think of to force someone to enter a date is to initialize the DateTimePicker with an obviously wrong date, like 1/1/2000.

If the .ShowUpDown property is False, you get a down arrow that the user can click to display a calendar. If the .Format property is set to Short, the date is shown in MM/DD/YYYY format (if you're in the U.S.; other locales have different ordering for the numbers), and the user can type in the date, or use + and - to increase and decrease each number (but it doesn't other parts of the date, so if you're at 31 for the day and you press +, the month doesn't change). Both of these can be active simultaneously.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question