Check if empty

  • Thread starter Thread starter stevenmckeon
  • Start date Start date
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
 
Hi
try
with worksheets("page1")
if application.counta(.range("C305:E318"))>0 then
.range("C305:E318").copy
'....
end if
end with
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top