Click here to Skip to main content
15,919,931 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Not sure how to phrase this.... PinPopular
Christian Graus25-Jun-08 15:44
protectorChristian Graus25-Jun-08 15:44 
GeneralRe: Not sure how to phrase this.... Pin
svanwass25-Jun-08 16:03
svanwass25-Jun-08 16:03 
GeneralRe: Not sure how to phrase this.... PinPopular
Christian Graus25-Jun-08 18:09
protectorChristian Graus25-Jun-08 18:09 
GeneralRe: Not sure how to phrase this.... Pin
Shog925-Jun-08 18:14
sitebuilderShog925-Jun-08 18:14 
GeneralRe: Not sure how to phrase this.... Pin
svanwass26-Jun-08 10:10
svanwass26-Jun-08 10:10 
AnswerRe: Not sure how to phrase this.... Pin
Chinners26-Jun-08 0:47
Chinners26-Jun-08 0:47 
AnswerRe: Not sure how to phrase this.... Pin
Guffa26-Jun-08 1:22
Guffa26-Jun-08 1:22 
GeneralRe: Not sure how to phrase this.... Pin
svanwass26-Jun-08 10:19
svanwass26-Jun-08 10:19 
GeneralRe: Not sure how to phrase this.... Pin
Steven St. John27-Jun-08 17:20
Steven St. John27-Jun-08 17:20 
QuestionWhere can I Get A Really Good Free Syntax Highlighter? Pin
Saul Johnson25-Jun-08 9:50
Saul Johnson25-Jun-08 9:50 
AnswerRe: Where can I Get A Really Good Free Syntax Highlighter? Pin
Luc Pattyn25-Jun-08 11:05
sitebuilderLuc Pattyn25-Jun-08 11:05 
Questionprinter character codes Pin
alvinmyname25-Jun-08 5:21
alvinmyname25-Jun-08 5:21 
GeneralUsing Word Interop Pin
PSmith99925-Jun-08 4:30
PSmith99925-Jun-08 4:30 
QuestionHelp for dll Pin
sumit703425-Jun-08 0:43
sumit703425-Jun-08 0:43 
AnswerRe: Help for dll Pin
Christian Graus25-Jun-08 1:03
protectorChristian Graus25-Jun-08 1:03 
GeneralRe: Help for dll Pin
sumit703425-Jun-08 1:07
sumit703425-Jun-08 1:07 
GeneralRe: Help for dll Pin
Christian Graus25-Jun-08 1:38
protectorChristian Graus25-Jun-08 1:38 
Questionapp.config Pin
Jay Royall24-Jun-08 23:03
Jay Royall24-Jun-08 23:03 
AnswerRe: app.config Pin
Christian Graus24-Jun-08 23:36
protectorChristian Graus24-Jun-08 23:36 
AnswerRe: app.config Pin
SteveNY25-Jun-08 4:28
SteveNY25-Jun-08 4:28 
AnswerRe: app.config Pin
Marek Grzenkowicz25-Jun-08 4:30
Marek Grzenkowicz25-Jun-08 4:30 
AnswerRe: app.config Pin
Mycroft Holmes26-Jun-08 17:10
professionalMycroft Holmes26-Jun-08 17:10 
QuestionCheckListBox binding to an Excel Spreadsheet Pin
Tazy24-Jun-08 22:41
Tazy24-Jun-08 22:41 
Good Morning All,

I have a question that I'm hoping someone out there maybe able to help me with. I'm trying to bind a CheckListBox to an Excel spreadsheet that has two columns of data. IPAddress & SystemName. I am new to programming and have only been able to get this fare. If anyone could help, you have my sincere thanks.

Tazy

Private m_sConn2 As String = "Provider=Microsoft.Jet.OLEDB.4.0;data source='C:\IPMonitoringTable.xls';Extended Properties=Excel 8.0"

Public Sub Retrieve_Records()

Dim conn As New OleDbConnection(m_sConn2)
Dim ExcelData As String
Dim i As Integer

conn.Open()

Dim da As New OleDbDataAdapter("Select IPAddress, SystemName, SysDate, SysTime, UserID from [IpAddrMonitor$]", conn)
Dim ds As DataSet = New DataSet

Try

da.Fill(ds)
CheckedListBox1.DataSource = ds
CheckedListBox1.DisplayMember = ds.Tables(0).TableName

'MsgBox(CheckedListBox1.Items(0).ToString) 'This didn't work
'MsgBox(CheckedListBox1.Items.Item(i).ToString()) 'Nor This

Me.Refresh()

Catch OleDbExceptionErr As OleDbException
MsgBox(OleDbExceptionErr.Message)
End Try

conn.Close()
AnswerRe: CheckListBox binding to an Excel Spreadsheet Pin
Christian Graus24-Jun-08 23:04
protectorChristian Graus24-Jun-08 23:04 
GeneralRe: CheckListBox binding to an Excel Spreadsheet Pin
Tazy25-Jun-08 0:55
Tazy25-Jun-08 0:55 

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.