Label.Caption causes Calculation on all sheets

fant0mas

New Member
Joined
Sep 14, 2006
Messages
3
Hello Dear Board Users,

this is my first post, my Name is Patrick and I am currently working in Japan... :)

So, here is my problem:

I have an Excel Table with ca. 10 sheets showing asset reports. As the currency is selectable via a switch, I would like to insert a label displaying the current currency.

This label should appear on every sheet and be updated when changing currencies.

Unfortunately, Excel calculates the numbers 10 times when doing so...

Here's the code:

Code:
Sub Eurosign()

    For Each Sht In ActiveWorkbook.Sheets

        If Sht.Name <> "Data" And Sht.Name <> "DataYen" And Sht.Name <> "DataYenRAW" And Sht.Name <> "DataEuro" And Sht.Name <> "Data_PsGG" And Sht.Name <> "stammdaten" And Sht.Name <> "SAPBEXfilters" And Sht.Name <> "SAPBEXqueries" Then

            Label1.Caption = "€"

        End If

    Next Sht

End Sub


Thanks for your replies!

Patrick
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

fant0mas

New Member
Joined
Sep 14, 2006
Messages
3
Main Problem

Hello again,

maybe I should post more clearly, what the problem is...

I want to automatically change 8 labels in 8 different sheets. They all are called "Label1". But when I use above code, it seems that excel recalculates the whole workbook with each of the labels...

Can I force excel not to recalculate anything when using above or another formula?

Best Regards,

Patrick
 

fant0mas

New Member
Joined
Sep 14, 2006
Messages
3
Because of formatting reasons... the sheet is very loaded and complex.

But 5 minutes ago I found a solution: I learned about "EnableCalculation=false" and it works very fine...

So i will close the topic...

Thank you for the answer!

Patrick
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,834
Messages
5,855,905
Members
431,772
Latest member
dannyboi1

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
Top