View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Nick H[_3_] Nick H[_3_] is offline
external usenet poster
 
Posts: 48
Default xlPasteValues is also pasting Formats

Thanks Gary,

And so it should. I'm fairly confident there is nothing wrong with the
code whatsoever, syntax-wise. However, the fact remains that within my
environment formats are getting pasted when they shouldn't. I need to
hear from someone who knows what might be causing this and how I can
fix it.

Perhaps a bit more background is required since, after a bit more
experimentation, I'm wondering if this might be a file type or file
location issue. If I manually copy from an external workbook and
choose PasteSpecial from the ribbon's 'Paste' drop-down I don't see
the usual PasteSpecial dialog but one that offers option buttons of
Paste or PasteLink and a large list of formats.

The workbook containing the code is an xlsb file that gets opened from
a link on a web page. Users enter their data and may even copy and
paste the data to a sheet that's formatted as a UI. Naturally we don't
want them screwing up the interface by pasting formats in from other
workbooks so the 'Paste' action is redirected to our own routine that
contains the PasteSpecial line referred to above.

These efforts are proving impotent though, as formats are getting
pasted anyway!

Br, Nick