Unanswered: Open and edit form in Excel file from Access
(Excel and Access 2003 on Win XP)
I have code that opens an Excel file successfully and runs a module's code but I know need to change this code so instead it:
1) Opens a form in the Excel file initial code opens
2) Makes a few selections (sets some form fields' values) based on Access data, and
3) launches code used by a button's OnClick event on the form. (I'd use sendkeys to "click" the button?)
Thought the hardest part was opening and connecting to the Excel file but getting a form to open has me stumped. And I'm not finding anything specifically like this on the Internet.
Someone's kind help would be much appreciated.
Here's my existing code.
Public Sub RunExcelCode_ETTFillOptionSheet(OptionID As Integer)
Dim xlApp As Variant
Set xlApp = GetObject(, "Excel.Application")
xlApp.Application.Visible = True
'This is the code I want to remove and replace with code that will open form
xlApp.Run "ExcelFile.xls!Options.OptionSheet_Fill", True, OptionID