Click here to Skip to main content
14,364,335 members

Visual Basic

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder12-Jul-09 23:40
adminChris Maunder12-Jul-09 23:40 
PinnedHow to get an answer to your question PinPopular
Chris Maunder10-Nov-05 17:30
adminChris Maunder10-Nov-05 17:30 
QuestionMessage Closed Pin
17-Nov-19 21:37
professionalMorgan Lang17-Nov-19 21:37 
AnswerRe: can not find the pin Pin
Richard MacCutchan17-Nov-19 22:17
protectorRichard MacCutchan17-Nov-19 22:17 
Questiongroup by name for sum amount Pin
Member 1332257413-Nov-19 20:39
memberMember 1332257413-Nov-19 20:39 
AnswerRe: group by name for sum amount Pin
Dave Kreskowiak14-Nov-19 3:40
mveDave Kreskowiak14-Nov-19 3:40 
Questioncode project data base Pin
abuahmed20191-Nov-19 5:24
memberabuahmed20191-Nov-19 5:24 
AnswerRe: code project data base Pin
Dave Kreskowiak1-Nov-19 6:00
mveDave Kreskowiak1-Nov-19 6:00 
QuestionSystem.IO.IOException HResult=0x80131620 When using NetworkStream.Read function Pin
fd975029-Oct-19 23:48
professionalfd975029-Oct-19 23:48 
AnswerRe: System.IO.IOException HResult=0x80131620 When using NetworkStream.Read function Pin
Richard MacCutchan30-Oct-19 0:09
protectorRichard MacCutchan30-Oct-19 0:09 
GeneralRe: System.IO.IOException HResult=0x80131620 When using NetworkStream.Read function Pin
fd975030-Oct-19 0:23
professionalfd975030-Oct-19 0:23 
GeneralRe: System.IO.IOException HResult=0x80131620 When using NetworkStream.Read function Pin
fd975030-Oct-19 1:02
professionalfd975030-Oct-19 1:02 
QuestionHow to solve problem with datagrid and tabcontrol(vb.net) Pin
Member 1447080727-Oct-19 23:52
memberMember 1447080727-Oct-19 23:52 
Error in exporting SHEET2
code to populate datagrid:
'For x = 0 To ds.Tables.Count - 1
'    Dim tp As New TabPage("TabPage" & x)
'    TabControl1.TabPages.Add(tp)
'    DataGridView(x) = New DataGridView
'    'Dim tabPagex As System.Windows.Forms.TabPage
'    tp.Controls.Add(DataGridView(x))
'    DataGridView(x).DataSource = ds.Tables(x)
'    DataGridView(x).Dock = DockStyle.Fill
'Next


Export to excel:
Dim xlApp, xlBook, xlSheet As Object
        xlApp = CreateObject("Excel.Application")
        xlBook = xlApp.Workbooks.Add
        xlSheet = xlBook.Worksheets()
        xlApp.Visible = True
        xlSheet = xlBook.Sheets("sheet1")
        Dim Cols As Integer
        For Cols = 1 To DataGridView1.Columns.Count
            xlApp.Cells(1, Cols) = DataGridView1.Columns(Cols - 1).HeaderText
        Next
        Dim i As Integer
        For i = 0 To DataGridView1.RowCount - 1
            Dim j As Integer
            For j = 0 To DataGridView1.ColumnCount - 1
                If Me.DataGridView1(j, i).Value Is System.DBNull.Value Then
                    xlApp.Cells(i = 2, j = 1) = ""
                Else
                    xlApp.Cells(i + 2, j + 1) = DataGridView1(j, i).Value.ToString
                End If
            Next
        Next
        xlApp.Sheets.Add(xlApp.Sheets("sheet1"))
        xlApp.Sheets("sheet2").Select()
        For Cols = 1 To DataGridView2.Columns.Count
            xlApp.Cells(1, Cols) = DataGridView2.Columns(Cols - 1).HeaderText
        Next
        For i = 0 To DataGridView2.RowCount - 1
            Dim j As Integer
            For j = 0 To DataGridView2.ColumnCount - 1
                If Me.DataGridView2(j, i).Value Is System.DBNull.Value Then
                    xlApp.Cells(i = 2, j = 1) = ""
                Else
                    xlApp.Cells(i + 2, j + 1) = DataGridView2(j, i).Value.ToString
                End If
            Next
        Next
        xlApp.Sheets.Add(xlApp.Sheets("sheet2"))
        xlApp.Sheets("sheet3").Select()
        For Cols = 1 To DataGridView3.Columns.Count
            xlApp.Cells(1, Cols) = DataGridView3.Columns(Cols - 1).HeaderText
        Next
        For i = 0 To DataGridView3.RowCount - 1
            Dim j As Integer
            For j = 0 To DataGridView3.ColumnCount - 1
                If Me.DataGridView3(j, i).Value Is System.DBNull.Value Then
                    xlApp.Cells(i = 2, j = 1) = ""
                Else
                    xlApp.Cells(i + 2, j + 1) = DataGridView3(j, i).Value.ToString
                End If
            Next
        Next

AnswerRe: How to solve problem with datagrid and tabcontrol(vb.net) Pin
Richard MacCutchan28-Oct-19 0:14
protectorRichard MacCutchan28-Oct-19 0:14 
GeneralRe: How to solve problem with datagrid and tabcontrol(vb.net) Pin
Member 1447080730-Oct-19 18:33
memberMember 1447080730-Oct-19 18:33 
GeneralRe: How to solve problem with datagrid and tabcontrol(vb.net) Pin
Richard MacCutchan30-Oct-19 23:58
protectorRichard MacCutchan30-Oct-19 23:58 
QuestionVB Script stopped working on Windows 10 + Office 365 Pro Pin
Member 1463660627-Oct-19 22:29
memberMember 1463660627-Oct-19 22:29 
AnswerRe: VB Script stopped working on Windows 10 + Office 365 Pro Pin
OriginalGriff27-Oct-19 22:33
protectorOriginalGriff27-Oct-19 22:33 
GeneralRe: VB Script stopped working on Windows 10 + Office 365 Pro Pin
Member 1463660627-Oct-19 22:36
memberMember 1463660627-Oct-19 22:36 
GeneralRe: VB Script stopped working on Windows 10 + Office 365 Pro Pin
OriginalGriff27-Oct-19 22:39
protectorOriginalGriff27-Oct-19 22:39 
GeneralRe: VB Script stopped working on Windows 10 + Office 365 Pro Pin
Member 1463660627-Oct-19 23:28
memberMember 1463660627-Oct-19 23:28 
GeneralRe: VB Script stopped working on Windows 10 + Office 365 Pro Pin
OriginalGriff27-Oct-19 23:41
protectorOriginalGriff27-Oct-19 23:41 
GeneralRe: VB Script stopped working on Windows 10 + Office 365 Pro Pin
Member 1463660627-Oct-19 23:53
memberMember 1463660627-Oct-19 23:53 
GeneralRe: VB Script stopped working on Windows 10 + Office 365 Pro Pin
OriginalGriff28-Oct-19 0:08
protectorOriginalGriff28-Oct-19 0:08 
QuestionListbox event, ItemSelectionChanged, how to wait for last event, or cancel events Pin
jkirkerx24-Oct-19 8:36
professionaljkirkerx24-Oct-19 8:36 

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.