Check if empty

S

stevenmckeon

Hi All,

I have a sheet that copies cells from excel to word. I need to be abl
to determine if the clipboard copy is empty - if its empty it fails.

Sheets("Page1").Select
Range("C305:E318").Copy

Basically I need to be able to say if the range to be copied is in fac
empty - ignore. If range to be copied has value then paste it.

I have code to copy and paste but I need to run an IF that determine
whether the copy and paste is run or not.

Any assistance appreciated.

Thnaks

Stev
 
F

Frank Kabel

Hi
try
with worksheets("page1")
if application.counta(.range("C305:E318"))>0 then
.range("C305:E318").copy
'....
end if
end with
 
S

stevenmckeon

For more clarification here is more of my code. How would I incorporat
the changes correctly?


+++++++++++
' Copy the data for the new document to the clipboard
Sheets("Page1").Select
'Range("C305:E318").Copy

' Tell Word to paste the contents of the clipboard into th
word doc

If wrdDoc.Bookmarks.Exists("three") = True Then

'Paste it
wrdDoc.Bookmarks("three").Select
appWD.Selection.Paste
End If
+++++++++++

The selected range contain text and numbers they are general fields.

Thnak
 
Top