Trying to update a checkbox in excel from access public sub

ShiftyJaffa

Registered User.
Local time
Today, 13:13
Joined
Nov 10, 2004
Messages
36
Hi,

I'm trying to update some Checkboxes which are in an Excel sheet, but I'm trying to do it from VBA in a public sub I have created in an Access Module.

I have linked the Excel sheet and can change the cells using queries, but this will not change the checkboxes. I'm running Access 97 and am looking for some code to open the Excel sheet (preferably hidden) and change the check box at runtime, is this possible?

Thanks in advance for any help
 
You need to open the excel sheet as an object and define it, then you can control it from Access as you would in Excel VBA... see this link for details

http://www.access-programmers.co.uk/forums/showthread.php?t=63291

Just remember, if you don't make the excel sheet visible, the you need to put the following command in at the end of you sub to close excel, or it will stay open and you'll have to restart (voice of experience!)

xl.application.quit
 

Users who are viewing this thread

Back
Top Bottom