View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Terry von Gease Terry von Gease is offline
external usenet poster
 
Posts: 38
Default 2000 vs 2002 xConstants

I created a workbook on Excel 2002 and in some procedure or another there
was a line something like this...

.. . .
some_range.PasteSpecial xlPasteColumnWidths
.. . .

I put the .xls file on a machine that was using Excel 2000 and this line
generates an error indicating that it doesn't understand the constant
'xlPasteColumnWidths'.

Fine says I, let's see what it does understand, so I add a new worksheet,
just to be careful,
select a range on it,
copy it, select another like-minded range,
turn on macro recording,
invoke pastespecial and select column widths,
turn off macro recording and go look at the macro thus created.

Most interesting that the pastespecial in the recorded macro refers to the
constant 'xlColumnWidths', not 'xlPasteColumnWidths'. When I take a look at
the value of xlColumnWidths, it seems to be defined but it's empty.

Returning to my Excel 2002 environment, it's never heard of xlColumnWidths.
Moreover xlPasteColumnWIdths has a value of 8.

I have no idea of the provenance of the Excel 2000 on the experimental
machine. None, nada ,zip, zero.

What gives?

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley