Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42427

[Excel] Can't put IsEmpty in a code

$
0
0
There is a code:
Code:

Sub CopyToClipboard()
    Dim str As String
    For Each rangeRow In Selection.Rows
        For Each rangeCol In rangeRow.Cells
            str = str & rangeCol.Value & ","
        Next
        str = Left(str, Len(str) - 1) & vbCrLf
    Next

    With New DataObject
        .SetText str
        .PutInClipboard
    End With
End Sub

I need to perform this code on not empty cells only, but can't figured out how to put IsEmpty() in actual code.

Viewing all articles
Browse latest Browse all 42427

Trending Articles