Solved

Excel ActiveX combo boxes are slowing file open/save

Posted on 2014-03-19
8
556 Views
Last Modified: 2014-03-19
Greetings,

I am having open/save issues with an Excel XLS formatted workbook.

The workbook starts as 2 worksheets. There no issues at this stage.

The first worksheet contains 2 named ranges, each with 20 items.

The second worksheet contains a lightly formatted form which extends to F23. It also contains 2 columns of 15 (a total of 30 per sheet) ActiveX Combo Boxes which reference the 2 named ranges. The second worksheet is copied within the workbook for each “component” of a particular job. Some jobs require 60 components, thus the second worksheet might be copied (under scripted control) up to 60 times within one workbook. With 60 sheets, the file size remains under 2Mb, containing 1800 (30x60) ActiveX controls.

With that many sheets, the workbook takes 20 seconds or more to load. While that’s not the end of the world, it triggers unpredictable user responses. It just seems wrong on an otherwise fast system.

I first tested by removing all ActiveX Combo Boxes, after which the workbook opened instantaneously. I then substituted all the ActiveX Combo Box controls for Excel Combo Box form controls, after which the workbook also opened instantaneously. Unfortunately the form control version of the combo box does not provide the programmability I require.

Note that anywhere from 1 to 30 of the combo boxes might be selected on any one sheet.

Considering there are only 2 unique combo boxes throughout the entire workbook, how can I make the form more efficient?

Thanks!
0
Comment
Question by:DavidBloom
  • 4
  • 4
8 Comments
 
LVL 46

Expert Comment

by:Martin Liss
ID: 39940411
Can you attach the workbook, or a sample that shows the problem?
0
 
LVL 1

Author Comment

by:DavidBloom
ID: 39940440
Excellent comment. Attached.
ProcessSheets---Template--ver-3g.xls
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 39940489
Is the following and similar code there because you have a problem with the comboboxes changing size? If so you might try this solution.

I'm of course not familiar with your workbook but if only one combobox needs to be used at any one time then you could also try the floating, single, combobox described in this article of mine.

Private Sub dd10_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    dd10.Width = 300
End Sub

Open in new window

0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:DavidBloom
ID: 39940606
The VBA is there to temporarily display a 2 column drop down that are wider than the form column. I also tested by keeping the combo boxes and eliminating the VBA, but no difference in load times.

Thank you. I'll read up on your article.
0
 
LVL 1

Author Comment

by:DavidBloom
ID: 39940637
I like it!  Will work on an adaptation of your coding ...

Best to put one floating control per sheet, or one per workbook within a public module (or similar)?
0
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 39940948
One per sheet.
0
 
LVL 1

Author Closing Comment

by:DavidBloom
ID: 39940982
Thank you Martin.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 39940997
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2013
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question