Visual Basic - TechRepublic
General discussion
January 17, 2002 at 06:20 AM
doc7213

Visual Basic

by doc7213 . Updated 24 years, 5 months ago

I am writing my first VB Program and I need some help. I have several text boxes on the form and need to save the entire form to an excell spreadsheet. I have the menu save sub done, but it will only save one of the text boxes. Any help would be appreciated. The code looks like this…

Private Sub mnuFileSaveAs_Click()
CommonDialog1.Filter = “Excel Files (*.xls) | *.xls”
CommonDialog1.ShowSave
If CommonDialog1.FileName <> “” Then
Open CommonDialog1.FileName For Output As #1
Print #1, txtDate.Text
Close #1
End If

End Sub

This discussion is locked

All Comments