Bonjour je viens de faire une vba sur word mais je ne comprend pas pourquoi cela ne marche pas ^^"
vba excel
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 Sub observ() Dim exl Set exl = CreateObject("excel.application") exl.Visible = True With exl .Workbooks.Open "D:\Downloads\Ressources\Ressources\effecitfservice.xlsm" .Run "copier" .Workbooks("effecitfservice.xlsm").save .Quit End With Documents("Transmission.docm").Activate With ActiveDocument Selection.Find.ClearFormatting With Selection.Find .Text = "Observation journalière individuel" .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Selection.EndKey Unit:=wdLine Selection.MoveDown Unit:=wdLine, Count:=2 Selection.PasteAppendTable End With ActiveWindow.Close False End Sub
si quelqu'un a une idee
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 Sub copier() Dim DL As Long DL = Cells(Application.Rows.Count, 2).End(xlUp).Row Range("B2:B" & DL + 1).Copy 'Je copie les lignes de A3 à la dernière ligne (pas besoin ici de sélectionner, sauf si vous le voulez vraiment, dans ce cas, rajouter la ligne select à la place de Copy puis Selection.Copy End Sub
Partager