-1

I'm just learning to use VBA and have to be quite innovative for a linguistic project I'm currently working on. I hope you could help!

I am building up a glossary offering 4 different languages, and people have to be able to chose any couple of languages out of these 4.

So I build up a "start page", where one could chose the Source Language and the Target Language.

My goal : - click on the Source Language => click on Target Language - Macro sends user to Content list of chosen Source Language (Content_FR Sheet, for example) - at the same time, the list in Term List Sheet should filter the Target Language to the chosen language (English, for example). - when user clicks a specialty field in the Content Sheet, it sends him to the Filtered Term List.

Everything is in place, I'm just stuck with that 2-ways start condition: I can only click one field before the macro sends me on to the Content or Term List sheet. Do you have an idea how to fuse those 2 VBA together? Even if I have to make one macro for each possible language couple, of course.

I hope this was clear enough... I've been swimming (drowning?) in this file for so long, I’m not sure how to explain it.

I very much hope one of you will have some genious idea to help me out there ;)

(Didn't know how to attach the file is attached, so I just uploaded it here: [URL=http://www.k-upload.fr/afficher-fichier-2018-10-21-1b9b7bf03fichetermino.xlsm.html][IMG]http://file.k-upload.com/k-upload_fr.png[/IMG][/URL]).

  • 2
    please share your current code here. You question needs to be centered around the code you provide. What does the code do right? What does the code do wrong? What do you want the code to do in addition to what it already does? – urdearboy Oct 21 '18 at 21:52
  • Your link is broken, but regardless, almost no-one will download a macro-enabled file. All you need here is a screen shot and the relevant part of your code. If you don't want a single selection to trigger navigation, then use checkboxes or a listbox for the Source and Target selections, then use a button to trigger the navigation. – Tim Williams Oct 22 '18 at 01:30

3 Answers3

0

I've tried and spent some time to see if there is any solution to your problem.

The answer is no, you can't have two button working at the same time (two different codes working at the same time/parallel).


Therefore you can't press one button and start another button click. Excel needs to execute one code and finish it. Then it can start the next one.

Assume I start at worksheet "Start Page". I press "English" and the code can send me to the "Sommaire_EN" worksheet. But here it ends. The reason is that Excel (the VBA application) don't know what you want to do in advance. The code can't know what i want to press when I'm at the "Sommaire_EN" worksheet, because you haven't decide anything (Economy or Promotion).

So I was thinking, maybe I can pause the code that was triggered by the button "English" and then click on another button "Economy" and then resume my first code... It can't. The first code needs to "finish", then you can execute the next code.

A solution could be to click "English", then make a form/list pop up where you choose your category word ("Promotion"). This is way more complex and I don't think it will be easy to maintain but is doable...

As a bonus, I cleaned up your workbook, and some comments:

  • Select statements as Sheets("Synthèse").Select is replaced with Worksheets("Synthèse").Activate since Select should be avoided but macro recorder use it automatically.
  • I created a module for each Sommaire_Language worksheet, so English has one module, Spanish has one etc. Is way more easier to locate code.
  • I linked all the button to respective word for all languages.
  • Don't change worksheet names... the code will stop working (Content_EN -> Sommaire_EN)
  • I added filter for the "Start Page" buttons. When you click on a language button, the worksheet Synthèse will be filtered only on the language and send you to the Sommaire_ sheet for the language.

You have some errors in your worksheet "Synthèse"...

Overall, really good work with the layout and the work, easy to follow. I can only guess how much time you must have spent. I like when people are trying to teach each other!!

Wizhi
  • 6,424
  • 4
  • 25
  • 47
  • Link to edited workbook: https://www.dropbox.com/s/nniynebbg0z4ncp/k-upload-file_2018-10-21-1b9b7bf03fichetermino_2.xlsm?dl=0 – Wizhi Oct 22 '18 at 13:19
  • Hi Wizhi :) Thank you sooooo much for having spent this much time trying to solve my issue! I've thought hard about your advice, and maybe found something: - let the user chose only the target language first - it send him to the right content sheet - in there, the user could chose the target language, which would automatically filter the target language in the Synthese file. - then he could click any specialty field and procede as planed. – Ingrid Fischer Oct 22 '18 at 20:05
  • But => is it possible for the "filtering macro" no to swith the view over to the synthese sheet while the target language is being filtered, so that the user remains on the Content sheet and spends some tome reading and selecting the topics? – Ingrid Fischer Oct 22 '18 at 20:08
  • Another question: should I replace all occurrences of "select" or is it just where the sheet name is affected? And why? – Ingrid Fischer Oct 22 '18 at 20:16
0

Answer your questions :)

1 . - I think it's a good way to focus on the target language. However, I think it's unnecessary to choose again (in there, the user could chose the target language, which would automatically filter the target language in the Synthese file.).. I think you can do that filtering when you choose the target language at "Start Page". It will save you a lot of maintain work also (otherwise you need to link another 16 buttons)...

Filtering from the "Start Page", something I tried to achieve in the workbook I edited. The target and source language will be filtered from the "Start Page" when the user selects one language. In the dropbox link (in previous comment section) you will find the changed workbook and you can download it :), If you have trouble to download it, I will also post all the code in another answer so you can just copy it and add (but you need to link each sub code to correct button.

2 . - Yes. By first selecting the synthese sheet, then filter and finally direct the person to the content sheet. It should go so fast so most people wouldn't notice that the filtering part occurs.

Worksheets("Synthèse").Activate 'Select the synthese sheet to filter.
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
    "English" 'Filter synthese sheet
Worksheets("Sommaire_EN").Activate 'Go to content sheet

3 . - No (it was just a notice from my side). I don't think you need to if you don't want to. If there's a lot of code and if you plan to make way more code with complex interactions, you should definitely not have any select statements (it will reduce potential errors when you have pages of code ). But with this light code, I wouldn't. The payoff is to small right now to make the time worth it :). The benefit with select, is that it's easy to understand and to follow what's happening. The other one require a little bit more effort to understand at first glance, that's at least my opinion.


I think we are on the same path.

For every button at the Start page,

enter image description here

I added this code to every button in your workbook (for each content sheet I change to the "correct language).

Sub SommaireEN()
'
' SommaireEN Macro
'

'
    Worksheets("Synthèse").Activate 'Activate the Synthese sheet
        ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English" 'Since you click the button English, it will filter language english
    Worksheets("Sommaire_EN").Activate 'Go to sheet Sommaire_EN.

End Sub

Alt + F11 to reach this view. Each code is linked to it's corresponding button.

enter image description here

So when a user click on the button at the "Start Page", example Deutschen, the Synthese worksheet will filter to the selected language and you will be directed to the content sheet for Sommaire_DE. Notice it will not select any specialty field in the synthese sheet, only language. enter image description here

The user will end up at the Deutsch sheet and when he click a specialty field, for example Wirtschaft...

enter image description here

... then the synthese worksheet will be updated too and the user will end up here :)

enter image description here

Feel free to ask anything :)

Wizhi
  • 6,424
  • 4
  • 25
  • 47
  • Hi Wizhi :) Thank you sooooo much for all the work you've done! I'm studying it in detail right now and think I have understood the logic and technic. I could even develop other options around these inputs of you - thank you :D I'll post the edits when I'm ready (shouldn't be too long). – Ingrid Fischer Oct 26 '18 at 20:44
  • Hi again Ingrid :)!! Thanks for the kind words, much appreciated. Lovely, if there are any parts that need further clarifications or if you have any questions just feel free to ask. Amazing work from your side too, I really like the document :)! – Wizhi Oct 27 '18 at 08:14
  • Thank you Wizhi :D – Ingrid Fischer Oct 28 '18 at 17:44
  • 1
    Thank you Wizhi, I appreciate your comment :D I've made some changes and adjusted the whole file to new ideas, and here is the result: https://www.dropbox.com/s/bg8e50a5mv9um98/Fiche%20terminologique_Test%20utilisation%20-%20Copie.xlsm?dl=0 (The only thing I couldn't do was change the .select, as the macro suddenly stops working....?) – Ingrid Fischer Oct 28 '18 at 17:55
  • 1
    I still have to open questions, though: - can I make my macros work even with hidden sheets? - how can I link the cells in the "synthèse"-sheets to the source cells with hyperlinks, so that the user could click a word and be sent right to the one table where the word is being explained? Do you happen to have any input on that too? – Ingrid Fischer Oct 28 '18 at 17:55
  • Is ok. Yes, you can make macros on hidden sheets. What it basically does is that you "unhidden" the sheets, do your calculations/code performance and then "hide" the sheet again. We combine this with not showing updates during running code and therefore the user experience no visible sheet. Yes it's doable to do hyperlink sheets. However it needs to be applied manually to each cell so I would think twice before applying it to make it more "maintainable". – Wizhi Oct 28 '18 at 18:58
  • Code for hiding sheet: `Application.ScreenUpdating = False Sheets("ThisSheet").Visible = True 'Place your code here Sheets("ThisSheet").Visible = False Application.ScreenUpdating = True` – Wizhi Oct 28 '18 at 19:18
  • I just check your workbook (saw the link). Impressive!!! A lot have change and it looks really nice. Don't care about the .select. There are only some parts that is easy to change .select -> .active, unfortunatly ;). I like that you use the module with names!!!!! Big thumb up. It's much easier to understand see which part of the code that are located to where. I understand what you mean with hidden sheets "A, B, C" etc.. Please elaborate what you want to do :) and I can give more detailed explanations. I'm currently looking into how to apply hyperlinks on many cells at once.. :P – Wizhi Oct 28 '18 at 19:56
  • Hi again Wizhi :) Many thanks again for the extra work you're putting into my issue!! I have tried the above-mentionned code, and I think I could make it work, but the tab of the sheet I want to go to is still visible. I'm not quite sure how to do this. I've found this post https://www.developpez.net/forums/d1538949/logiciels/microsoft-office/excel/macros-vba-excel/masquer-onglets-d-classeur-laisser-active/ that seems to match my need, and it seemed easy enough... but it doesn't work in my worksheet, I don't know why. I'll go on looking any way ;) – Ingrid Fischer Oct 29 '18 at 20:35
  • Really good you started a new thread for this new question!!!!!!!!!! I will take a look too and give my view. But it's good with different input, take care and amazing work of you :)! – Wizhi Oct 29 '18 at 23:24
  • Thank you :) yes, I thought it might be better to start a new thread as the main issue on this thread is actually solved ;) Looking forward to seeing you over there again! – Ingrid Fischer Nov 01 '18 at 13:30
0

Code for Sommaire_DE:

Sub Naturschutz()
'
' Naturschutz Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Naturschutz"
         Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Naturschutz"
    Range("C3").Select
End Sub
Sub ClearFilterDE()
'
' ClearFilter Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2
    Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = ""
End Sub
Sub Umweltbewusstsein()
'
' Umweltbewusstsein Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Umweltbewusstsein"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Umweltbewusstsein"
    Range("C3").Select
End Sub
Sub Energieeffizienz()
'
' Energieeffizienz Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Energieeffizienz"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Energieeffizienz"
    Range("C3").Select
End Sub
Sub Langlebigkeit()
'
' Langlebigkeit Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Langlebigkeit"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Langlebigkeit"
    Range("C3").Select
End Sub

Sub Gesetzliches()
'
' Gesetzliches Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Gesetzliches"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Gesetzliches"
    Range("C3").Select
End Sub

Sub Moderne_Technologien()
'
' Moderne Technologien Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Moderne Technologien"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Moderne Technologien"
    Range("C3").Select
End Sub
Sub Wirtschaft()
'
' Wirtschaft Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Wirtschaft"
         Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Wirtschaft"
    Range("C3").Select
End Sub
Sub Filmproduktion()
'
' Filmproduktion Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Filmproduktion"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Filmproduktion"
    Range("C3").Select
End Sub
Sub Promotionskampagne()
'
' Promotionskampagne Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Promotionskampagne"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Promotionskampagne"
    Range("C3").Select
End Sub
Sub Interne_Struktur()
'
' Interne Struktur Macro
'

'
    Worksheets("Synthèse").Activate
    Range("A5").Select
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Interne Struktur"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Interne Struktur"
    Range("C3").Select
End Sub
Sub ChangerTitreDE()
'
' ChangerTitre Macro
'

'
    Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Economy"
    Range("C3").Select
End Sub

Code for Sommaire_EN:

Sub Preservation()
'
' Preservation Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Preservation"
         Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Preservation"
    Range("C3").Select
End Sub
Sub ClearFilter()
'
' ClearFilter Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2
    Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = ""
End Sub
Sub Environmental_education()
'
' Environmental education Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Environmental education"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Environmental education"
    Range("C3").Select
End Sub
Sub Energy_efficiency()
'
' Energy efficiency Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Energy efficiency"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Energy efficiency"
    Range("C3").Select
End Sub
Sub Sustainability()
'
' Sustainability Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Sustainability"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Sustainability"
    Range("C3").Select
End Sub

Sub Legislation()
'
' Legislation Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Legislation"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Legislation"
    Range("C3").Select
End Sub

Sub New_technology()
'
' New technology Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "New technology"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "New technology"
    Range("C3").Select
End Sub
Sub Economy()
'
' Economy Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Economy"
         Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Economy"
    Range("C3").Select
End Sub
Sub Production()
'
' Production Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Production"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Production"
    Range("C3").Select
End Sub
Sub Promotion()
'
' Promotion Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Promotion"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Promotion"
    Range("C3").Select
End Sub
Sub Organizational_structure()
'
' Organizational structure Macro
'

'
    Worksheets("Synthèse").Activate
    Range("A5").Select
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Organizational structure"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Organizational structure"
    Range("C3").Select
End Sub
Sub ChangerTitreEN()
'
' ChangerTitre Macro
'

'
    Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Economy"
    Range("C3").Select
End Sub

Code for Sommaire_SP:

Sub Preservación()
'
' Preservación Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Preservación"
         Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Preservación"
    Range("C3").Select
End Sub
Sub ClearFilterSP()
'
' ClearFilter Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2
    Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = ""
End Sub
Sub Educación_ambiental()
'
' Educación ambiental Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Educación ambiental"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Educación ambiental"
    Range("C3").Select
End Sub
Sub Eficiencia_energética()
'
' Eficiencia energética Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Eficiencia energética"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Eficiencia energética"
    Range("C3").Select
End Sub
Sub Sostenibilidad()
'
' Sostenibilidad Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Sostenibilidad"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Sostenibilidad"
    Range("C3").Select
End Sub

Sub Legislación()
'
' Legislación Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Legislación"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Legislación"
    Range("C3").Select
End Sub

Sub Nuevas_tecnologías()
'
' Nuevas tecnologías Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Nuevas tecnologías"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Nuevas tecnologías"
    Range("C3").Select
End Sub
Sub Economía()
'
' Economía Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Economía"
         Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Economía"
    Range("C3").Select
End Sub
Sub Producción()
'
' Producción Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Producción"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Producción"
    Range("C3").Select
End Sub
Sub Fomento()
'
' Fomento Macro
'

'
    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Fomento"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Fomento"
    Range("C3").Select
End Sub
Sub Modo_de_funcionamiento()
'
' Modo de funcionamiento Macro
'

'
    Worksheets("Synthèse").Activate
    Range("A5").Select
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=2, Criteria1:= _
        "Modo de funcionamiento"
        Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Modo de funcionamiento"
    Range("C3").Select
End Sub
Sub ChangerTitreSP()
'
' ChangerTitre Macro
'

'
    Range("C1").Select
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "Economy"
    Range("C3").Select
End Sub

Code for Start_Page

Sub SommaireEN()
'
' SommaireEN Macro
'

'
    Worksheets("Synthèse").Activate
        ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "English"
    Worksheets("Sommaire_EN").Activate

End Sub
Sub SommaireSP()
'
' SommaireSP Macro
'

'
    Worksheets("Synthèse").Activate
        ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Español"
    Worksheets("Sommaire_SP").Activate

End Sub
Sub SommaireDE()
'
' SommaireDE Macro
'

'

    Worksheets("Synthèse").Activate
        ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Deutsch"
    Worksheets("Sommaire_DE").Activate

End Sub

Sub GlossaireFR()
'
' GlossaireFR Macro

    Worksheets("Synthèse").Activate
    ActiveSheet.Range("$A$4:$C$11652").AutoFilter Field:=1, Criteria1:= _
        "Français"
    Worksheets("Sommaire_FR").Activate

End Sub
Wizhi
  • 6,424
  • 4
  • 25
  • 47