Exporting textbox value from Access to Excel

Joined
Oct 22, 2007
Messages
12
Reaction score
0
Can someone tell me what is wrong with this code?
It is not writing anything to the destination worksheet. It looks solid, maybe an expert can tell me what I've done improperly.

Code:
 Private Sub btnXL_Click()
Dim objXL As Excel.Application
Dim objWB As Excel.Workbook
Dim objWS As Excel.Worksheet
Set objXL = Excel.Application
Set objWB = objXL.Workbooks.Open("L:\New L Drive\05, Supply Folders\02, PUR-1E\Requisitions\2007\PUR-1E.xls")
Set objWS = objWB.Worksheets("Form")
With objWS
.Cells(1, 1).Value = "Hello"
'.Cells(2, 1).Value = Me.txtXl
End With
objXL.Visible = True
End Sub

Thanks for the help in advance.

Marty
 

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