I’m using the code below
iMaxRow = 200
" Loop through columns and rows"
For iCol = 1 To 3
For iRow = 1 To iMaxRow
With Worksheets("GreatIdea").Cells(iRow, iCol)
" Check that cell is not empty."
If .Value = "" Then
"Nothing in this cell."
"Do nothing."
Else
" Copy the cell to the destination"
.Copy Destination:=Worksheets("Sheet2").Cells(iRow, iCol)
End If
End With
Next iRow
Next iCol
The code above is only applicable on the same excel sheet. I would like to extend it so it pastes into a word document. I presume it’s something with;
appWD.Selection.PasteSpecial
But the problem is, I haven’t made any selections. The code is good, just Copy Destination:=Worksheets("Sheet2").Cells(iRow, iCol) needs to be edited.
Thanks for your help!
1 Answer