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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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
 
Upvote 0
Why are you using Labels exactly, and not cell entries?
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,390
Members
448,957
Latest member
Hat4Life

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