Hello,
I'm working with MS Office 2007.
I have an Access database with client's data. I'd like to show those data on Excel's user form in the frames generated dynamically - one frame for one client (frame caption value is sth like: 'Client number ' & guyNumber). On one frame there will be all of the data shown with dynamically generated labels and textboxes. All of those frames are placed inside the main frame (e.g. name: 'ListOfClients').
Every client's frame has its height: 40. The frames are stored one under other. Scroll bar size of the main frame is also calculated dynamically, depending on numbers of client's.
Until now it's easy.
Now the problem is with placing all of those client's frames inside this main frame. As I mentioned, every frame is 40 px high so I calculated, that next frame's 'top' value will be: "guyNumber * 40" and it worked until I run it with the bigger database. I noticed that for number of clients bigger than ~820, excel shows: runtime error '6' - overflow.
I couldn't find out where's the problem but I finally did: The calculated 'top' value is bigger than 32767 (Microsoft reccomends this value to be an integer not bigger than 32767, which is max for integer value). But I need more.
Is there any solution or workaround to have those data correctly shown without any errors?
I'll be glad for any solution.
Best regards,
Michal
Bookmarks