Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Member_14500218

@Member_14500218
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • email a attached file vb.net
    M Member_14500218

    Dear Friends at code project, The code i use is as follows

    Private Sub BtnExcel_Click(sender As Object, e As EventArgs) Handles btnExcel.Click
    Try

            Dim MyConnection As System.Data.OleDb.OleDbConnection
            Dim dataSet As System.Data.DataSet
            Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
            Dim path As String = "C:\\Users\\Abhimanyu Singh\\Documents\\excel\\SalarySlip.xlsx"
    
            MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;")
            MyCommand = New System.Data.OleDb.OleDbDataAdapter("select \* from \[salaryslip$\]", MyConnection)
    
            dataSet = New System.Data.DataSet
            MyCommand.Fill(dataSet)
            DataGridView1.DataSource = dataSet.Tables(0)
    
            MyConnection.Close()
        Catch ex As Exception
            MsgBox(ex.Message.ToString)
        End Try
    
    End Sub
    

    End Class

    It works well for a single Excel file but if i try to open another fileit gives me error "OBJECT VARIABLE OR WITH BLOCK VARIABLE NOT SET" IAM NOT ABLE TO MOVE AHEAD PLEASE SUGEST REMIDIES

    Visual Basic csharp

  • how to deal with this error
    M Member_14500218

    Dear friends please help me how to deal with this error object variable with block variable not found not found

    Visual Basic help tutorial

  • email a attached file vb.net
    M Member_14500218

    unable to create a win-from for mailing 2 many clients using vb.net

    Visual Basic csharp
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups