Macro inconsistently refuses to let me size columns

N

Nancy

I have a macro that builds a table, populates it, and sizes the columns.
Sometimes, expecially when I am debugging, the system throws an error that
says that I can't access table columns because the table contains cells of
different sizes. Then, other times the system sizes the columns correctly.
This is driving me crazy!
 
F

Fletcher James

Setting the Autofit to Fixed Column Width will often solve these kinds of
problems. In particular, if you're doing any kind of cutting/pasting of rows
with Autofit to contents active, then pasted rows will have different cell
widths than the original (you can observe this behavior in Word when working
interactively.)

Sorry, I don't have the VBA code handy for this. It's not too tricky to
find, but I think you might need to set two different properties.

--
Fletcher James
President
Levit & James, Inc.

(703)771-1549
MailTo:[email protected]
http://www.levitjames.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