Firstly Leith,
Sorry about the Excel version, I guess I just entered 2012 when I set my profile up last year, I'm actually using Excel 2010. I apologize for the mistake and I've corrected my profile now.
I might be able to bend some rules and post a blank copy of the excel template if that is needed, I'd prefer not to - I'm fairly sure that ICT dept at work would find a reason to frown on that.
I'm not sure if it is that helpful, as I stated above, this code runs from an Access database, and I definitely can't post that online, that's a offense which could result in me looking for a new job...
Anyway, here is the code fragment that sets up the xlWS variable. As I'm trying to work out what is going on I've gradually explicitly referenced it again through the code so that I can try and rule out that as an issue.
I'm fairly sure that because this is the first time I've tried to get data from controls using VBA, there is something that I don't understand about referencing the shapes collection and type casting the resultant shape to a control so that I can get to the properties and methods of the various controls used.
Basically, can I reference WS.shapes(i) and expect to get a shape or do I need to do something with a shaperange to get down to a specific shape?
Otherwise I guess that I could explicitly reference each control via the worksheet somehow, perhaps something like
but I guess I am trying to do something that is a bit more elegant as I'd need to manually track each control down on the excel spreadsheet (there are over 21 checkboxes and more than a dozen other controls I need to read and handle.)
Anyway, thanks for trying to assist, I hope I've provided enough info now.
Let me know if you really need a copy of the excel spreadsheet, if you do, I guess I'll just have to dummy up a sheet with a few controls on it.
Bookmarks