(And final for now as I dont want you to hate me for bothering you too much today ^^)
Hello the experts,
I'm not good with VBA but I use it a lot, I usually record some stuff then ask my friend google about what I can't get recorded. I know all my macros are probably very weak but as long as I'm the only one at risk it's not an issue. But this time some colleagues are interested and I don't want to "sell" them a rotten file. So... Would you please have a look on my macros and let me know if you see something that should be improved so I can share my file with good chances it will work for other people ? Your corrections are obviously welcome, but also your advices to help me understand why I should do this and not do that...
Thank you very much for your help, Kind regards,
MACRO 1 : https://www.experts-exchange.com/questions/29166936/Check-VBA-macro-1.html
MACRO 2 : https://www.experts-exchange.com/questions/29166937/Check-VBA-Macro-2.html
MACRO 3 : https://www.experts-exchange.com/questions/29166939/Check-VBA-Macro-3.html
MACRO 4 : this is the specific macro for this specific file, basically it deletes this column, format this other one with help from the previous macros, and gets a lot of boring stuff does in a few secondes. It tooked 2mn to run when I did it first, then I improved it with some help here and there... And now it does the job in 3-5s. I dont copy it all, just the structure and a few examples so you can tell me what I should pay attention to and improve... Or what I should NEVER do like this... Thank you very much !!
' SoGe Macro
Selection.ColumnWidth = 30
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromRightOrBelow
ActiveCell.FormulaR1C1 = "=RC & "" ("" & RC & "" "" & RC & "")"""
Selection.AutoFill Destination:=Range("H2:H500"), Type:=xlFillValues
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "dpt"
ActiveCell.FormulaR1C1 = "FR ou ET"
ActiveCell.FormulaR1C1 = "Pays"
"... and so on
Application.ScreenUpdating = True