 |
noknok Level: Scholar
 Registered: 23-11-2007 Posts: 32
|
How to connect in Excel
Public Sub printform()
Dim xcelprint As New Excel.Application
Dim xlbook As Object
Set xlbook = excelprint.Workbooks.Open("C:\bio\form.xls)
With xcelprint
.Cells(4, 1) = form1.examtxt.Text
.Cells(4, 1) = form1.exptxt.Text
End With
xcelprint.PrintOut
Set xlbook = Nothing
Set xlsheet = Nothing
End Sub
this is the code i use to print
but instead of printing the excel i declare, the form is the one printing? why
|
|
02-02-2008 at 03:41 AM |
|
|
|
|
 |
 |