Let’s say I have an embedded Excel Spreadsheet on a Microsoft Access form. I call the object frame
ExcelFrame
and I add a text box on the form called
txtA1
and I add a button on the form called
cmdInsert
I want to type “Hello World” into the text box, click the button and have it appear in the A1 cell on that spreadsheet. What VBA do I use to accomplish this?
Thanks
You can automate Excel, write your value to the worksheet, then update the object frame.
Edit: The example was based on an external workbook file which is linked as the source for the form’s object frame.
To link a worksheet, choose the “Create from File” radio button, check the “Link” check box, and browse to select the workbook. That’s the way I did it with Access 2007. As I recall, it was similar with Access 2003.