View Single Post
  #2 (permalink)  
Vecchio 10-13-2009, 10:30 PM
Zeno Zeno non è in linea
Member
 
Registrato dal: Sep 2007
Messaggi: 44
predefinito

Non so se è la più semplice, ma è comunque una soluzione funzionante.
codice:
Public Sub selezioneB()
    Dim rng As Range
    Dim rngB As Range
    Dim nRows As Long
    Dim nRow As Long
    Set rng = Selection
    With rng
        nRows = .Rows.Count
        nRow = .Row
    End With
    If nRows > 1 Then
        Set rngB = Range("B" & nRow & ":B" & nRow + nRows - 1)
    Else
        Set rngB = Range("B" & nRow)
    End If
    rngB.Select
End Sub
Rispondi quotando