MsAccess data porting into Excel

G

Guest

Hi

I have a MSAccess form in which on the click of a button I wish to export
certain fields in a subform into MSExcel. How do I proceed with that ? I have
this code automatically built up. but what all should I add to export
certain fields of data into excel sheet and view excel sheet.

Private Sub Command92_Click()
On Error GoTo Err_Command92_Click

Dim oApp As Object

Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True

Exit_Command92_Click:
Exit Sub

Err_Command92_Click:
MsgBox Err.Description
Resume Exit_Command92_Click

End Sub


Thanks in advance
Madhuri
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top