Excel slowing dramatically when copying worksheets (VBA)

sam48639

New Member
Joined
Feb 7, 2018
Messages
1
Hi there,

I'm relatively new to VBA, although have been picking it up quickly in the past month or so.

I have been working on a spreadsheet that completes several actions dependant on certain cell's values in the spreadsheet. The spreadsheet essentially is used to analyse a time sheet; colour coding cell hours according to peoples names and changing the colour of the worksheet tab depending upon total working hours being in set ranges.

All works fine, and quickly, when only having one of these worksheets however I am looking to have this same set of code on several tabs within a workbook to analyse different jobs. When I copy the page, Excel performance drops drastically.

With only one sheet the time taken by VBA to run the code goes almost unnoticed. However, by only copying the page once and trying to insert hours, which fire the code, in the second page my spreadsheet will take about 5 seconds to calculate every time VBA fires!

Does anyone know if this is to do with having identical code in multiple worksheets please? This code includes ActiveX Command buttons if this makes any difference at all :)

Sam
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,215,640
Messages
6,125,977
Members
449,276
Latest member
surendra75

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