Take a datagridview and set its datasource to the table at 0 index of the returned dataset.
this code is for excell 2003 won't work with 2007
Public Function ReadExcel(filePath As [String], sheetName As [String]) As DataSet
Try
sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data...
just starting to get into the habit of writing comments. What do think about my comment writing? any suggestions!
Private Sub btnAddUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddUser.Click
Dim objUser As User
'Gets user index from...
:rolleyes:
Sorry I wasn't sure what to write in question.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim someproc As Process
someproc = Process.Start("d:\vypress.msi")
End Sub
Private...
Thanks it was a mistake but still after changing it if I enter age above 100 it doesn't shows messagebox but there is no exception shown as well to inform the user that obj.age has not been changed.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim obj As New Minimal
Dim userAge As Integer
userAge = CType(InputBox("Please enter your age"), Integer)
MessageBox.Show(obj.Age.ToString)
End Sub
Public...
when we create an instance of a class we also provide its state so are these both same and if not same what's the difference?
And also what's the difference when we use equals method for instance or for state?
I have listBox control of user objects where each object has userName and Password.
What I want to do is when a user enters userName and Password a method goes through the listBox checks for whether userName exists or not and if userName exists then matches the password.
What I have in my...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ts As TimeSpan
ts = New TimeSpan(9, 0, 0)
MessageBox.Show(ts.Hours.ToString)
End Sub
Suppose I want to add 2 hours to this timespan what would be the...
I think this code is working fine.
If (CheckBox1.Checked = CheckBox2.Checked) Then
Label1.Text = "On"
Else
Label1.Text = "Off"
End If
correct me if I am wrong.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.