vba - Too many shapes slow down the code

Tornado1981

Board Regular
Joined
Apr 1, 2010
Messages
248
Hi,
I have a sheet with about 600 shapes.
One of them (just one) is assigned to a macro that opens a simple userform.
When i click on it, it takes too much time to open the userform.
When I delete all other shapes, it opens faster.
I would really appreciate your help to solve this problem.
Thank you in advance.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Care to let us see the assigned macro that opens the simple user form ?
 
Upvote 0
What are these 600 shapes used for?
I surely hope you do not have 600 shapes with each one assigned to a different script.
There are a lot better ways to do things.

And any time you have a question about a script it's always best to show us the script.

Maybe your Userform initialize script has a lot in it. Show us that script also.
 
Upvote 0
None of the shapes are assigned to a script .. They are just shapes
Only one is assigned to a macro that opens a userform

Code:
Public Sub OpenAboutWindow()
    IAbout.Show False
End Sub
 
Upvote 0
A lot of UserForms have a Initialize code which runs when the UserForm Opens.

It looks something like this:
Code:
Private Sub UserForm_Initialize()
ListBox1.List = Range("A1:A20").Value
End Sub


Do you have one?
If so show us this code.
 
Upvote 0
I'm sorry I have no answer for you. Not sure why 600 shapes would cause your UserForm to load slowly.
Do any of your other Vba scripts run slowly?
I would imagine having this many shapes could cause things to run slowly. Depending on what type shapes and how large they are. And then what does open slowly mean. 1.0 milliseconds or 3 seconds. And how many controls on the UserForm etc. etc.

Try:
IAbout.Show Modeless
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top