Tom from Sacto
New member
- Local time
- Yesterday, 23:22
- Joined
- Apr 27, 2012
- Messages
- 2
Hello all, first time posting. I'm looking for some help with VBA; I am attempting to set up a command button to transfer data from an access record to an excel template. The best I can do is get the excel template to open with the "click" but it will not populate any cells. I have read and read all sorts of solutions, tried the ones I understood, but I'm not getting anywhere. Below is the code that I am using. Suggestions?
Private Sub Command717_Click()
Dim objXLApp As Object
Dim objXLBook As Object
Set objXLApp = CreateObject("Excel.Application")
Set objXLBook = objXLApp.Workbooks.Open("Q:\Access Work\Access Test 2.xlsx")
objXLApp.Application.Visible = True
objExcelBook.ActiveSheet.Range("C3") = Me.[Project Name]
objExcelBook.ActiveSheet.Range("D3") = Me.[Project #]
End Sub
Private Sub Open_New_Financail_Record_2_Click()
End Sub
Private Sub Command717_Click()
Dim objXLApp As Object
Dim objXLBook As Object
Set objXLApp = CreateObject("Excel.Application")
Set objXLBook = objXLApp.Workbooks.Open("Q:\Access Work\Access Test 2.xlsx")
objXLApp.Application.Visible = True
objExcelBook.ActiveSheet.Range("C3") = Me.[Project Name]
objExcelBook.ActiveSheet.Range("D3") = Me.[Project #]
End Sub
Private Sub Open_New_Financail_Record_2_Click()
End Sub