Macros

  • Thread starter jrampulla \(removethis\)
  • Start date
J

jrampulla \(removethis\)

I am trying to run a macro in a Word Table. Some cells
are blank, which causes the macro to give an error
message. How do I get the macro to "jump over" those
blank cells?
 
C

Charles Kenyon

I suspect that to help you, people are going to have to know more about what
it is you are trying to do with the macro in your table and see the actual
code you are using.


"jrampulla (removethis) @childcrafteducation.com"
 
D

Doug Robbins - Word MVP

Relying on "On Error Resume Next" will get you into trouble one day.

Far better to check for contents in the cell and only take the action if the
check returns the right result.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
D

DA

Doug is of course absolutely right. It's not good practice to ignore errors.
As Charles already suggested, perhaps the best thing would be for you to post your code so we can see what
you're actually trying to do


----- Doug Robbins - Word MVP wrote: ----

Relying on "On Error Resume Next" will get you into trouble one day

Far better to check for contents in the cell and only take the action if th
check returns the right result

--
Please post any further questions or followup to the newsgroups for th
benefit of others who may be interested. Unsolicited questions forwarde
directly to me will only be answered on a paid consulting basis

Hope this help
Doug Robbins - Word MV
 
J

Jezebel

A simple test is to check the length. An 'empty' cell actually contains two
characters.

If len(pCell.Range) > 2 then .... cell is not empty



"jrampulla (removethis) @childcrafteducation.com"
 

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

Top