0

I want below message in a cell:

Dim Msg As String
Msg = "Files moved: " & MovedCount & "(" & NotMovedCount + MovedCount & ")"
If NotMovedCount > 0 Then
    Msg = Msg & vbLf & "Files not moved:" & NotMovedCount & "(" _
        & NotMovedCount + MovedCount & ")" & vbLf & vbLf _
        & "The following files were not moved:" & vbLf _
        & Join(dict.keys, vbLf)
End If

MsgBox Msg, IIf(NotMovedCount = 0, vbInformation, vbCritical)

Could you please help me.

I am moving some files from one folder to another. If the files are already available in the target folder, this code gives list in message box. However i need that information in excel cell for example sheet 1, cell AF5.

0 Answers0