I came across a weird bug in excel97/VBA the other day. I was using a flexgrid to display some data I was retrieving from some text files. I did the usual thing, dragged the flexgrid onto a new form, set its properties and then started filling it with my retrieved data. So far so good. The problem came when I saved my workbook. It doubled in size. I opened it, saved it again and it doubled in size again. Pretty soon it went from about 750K to 70 Mbytes. Disaster. Anyway the way around this bug was to create the control programmatically. Here's how you do it.
In the declaration section - if you want your control to respond to events
Private WithEvents msflexgrid3 As MSFlexGrid
Now in your module or procedure
'Create the control
'
Set msflexgrid3 = userform1.Controls.Add("MSFLEXGRIDLIB.MSFLEXGRID", harry, True)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.