matteopacino
XLDnaute Junior
Bonjour ä tous,
j'ai une macro qui fonctionne très bien dont je poste le code en dessous.
Dim c As Range
Dim nb As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets(ws_name)
nb = ws.Range("B" & Rows.Count).End(xlUp).Row
For Each c In ThisWorkbook.Sheets(ws_name).Range("U" & fisrtChk & ":U" & nb).Cells 'myRange.Cells
With ThisWorkbook.Sheets(ws_name).Labels.Add(c.Left, c.Top, c.Width, c.Height)
.Name = c.Address
.Caption = ""
.OnAction = "'U_TOC_ch """ & c.Address & """, """ & ws.Name & """'"
.Locked = True
.LockedText = False
.Placement = xlMoveAndSize
.PrintObject = True
End With
c.Value = 1
Next
Ma question est comment réussir à exclure certaines cellules de la colonne U de cette boucle ? par exemple "U164"
Merci
Cordialement
j'ai une macro qui fonctionne très bien dont je poste le code en dessous.
Dim c As Range
Dim nb As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets(ws_name)
nb = ws.Range("B" & Rows.Count).End(xlUp).Row
For Each c In ThisWorkbook.Sheets(ws_name).Range("U" & fisrtChk & ":U" & nb).Cells 'myRange.Cells
With ThisWorkbook.Sheets(ws_name).Labels.Add(c.Left, c.Top, c.Width, c.Height)
.Name = c.Address
.Caption = ""
.OnAction = "'U_TOC_ch """ & c.Address & """, """ & ws.Name & """'"
.Locked = True
.LockedText = False
.Placement = xlMoveAndSize
.PrintObject = True
End With
c.Value = 1
Next
Ma question est comment réussir à exclure certaines cellules de la colonne U de cette boucle ? par exemple "U164"
Merci
Cordialement