I'm an experienced Access, VB6 and SQL Developer (data warehouse work) but a newbie at Excel I know too much from VB6 and Access VBA and frankly I'm a little dangerous in Excel.
The code below works flawlessly when run on Windows XP and executed in Excel 2010 and 2003 environments. I'm really hoping there's a simple solution otherwise I'll have to replace my UDT array with code that reads the worksheet directly, back when I built this the UDT array it was conceptually easier for me than the worksheet but really isn't that different. I would probably build this without the UDT array if I were doing it today, I just hope I'm not rebuilding this. Two possible complaints against my solution are speed, amazingly it's blazingly fast, another is system memory which hasn't been a problem.
So I'll start at the top when compiling I get a type mismatch error flagging the UDT typRecord.
So here is the declaration of typRecord
Here is the procedures declaration
And the declaration of the UDT itself and a few other globals and yes I'm having issues with the enum too but that's easier to work around. I have tried declaring the type as Public and also declared without the words Private or Public before it. I end up with the same type mismatch error. I'm really hoping someone tells me I have boneheaded mistake in the declarations and I can get on with this project. I'd rather be a bonehead than have to rewrite this.
Finally it type mismatches on more than just my custom function, I've added this code to address a duplicate record issue and it type mismatches against the native CSTR function. The enumeration shows up there as well.
I'm receiving 140 spreadsheets from various facilities and importing them into a database so an auditor can review the data and do comparisons. The workbooks all have 13 sheets and one hidden sheet, I'm iterating through the hidden sheet and picking off the data points that link into that. The designer of the whole collection built something very visually functional for a human but kind of a pain to deal with pro grammatically. So it was easier to dump this into an array and then parse out the elements of the array to gather the data. So ultimately I could take this code I'm using to load the UDT and write to my SQL Server, but it will be a lot messier. With the Jet or MSDE backend behind Excel I'm rather surprised this isn't easier. I'd rather just dump this into a transformation table in SQL Server and mess with the data there. If I'm missing an easier solution that way a link to an explanation page would be appreciated.
Bookmarks