A
al
Greetings,
I have a form with three group boxes and each has nine textboxs. I
was not able to finde a way to export text in those 27 boxes to Excel.
I mean what is the way to loop through excel cells in code, since
each one has to be hard-coded which makes it difficult to do all 27
cells???
MTIA,
Grawsha
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Dim xlApp As Excel.Application
xlApp = New Excel.Application
Dim xlBook As Excel.Workbooks
With xlApp
.Visible = True
.Workbooks.Add()
'This is difficult. since each cell has to be hard-coded here instead
of looping
.Range("A1").Value = textbox1.text
End With
End Sub
I have a form with three group boxes and each has nine textboxs. I
was not able to finde a way to export text in those 27 boxes to Excel.
I mean what is the way to loop through excel cells in code, since
each one has to be hard-coded which makes it difficult to do all 27
cells???
MTIA,
Grawsha
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Dim xlApp As Excel.Application
xlApp = New Excel.Application
Dim xlBook As Excel.Workbooks
With xlApp
.Visible = True
.Workbooks.Add()
'This is difficult. since each cell has to be hard-coded here instead
of looping
.Range("A1").Value = textbox1.text
End With
End Sub