What is the decimal value of xlDataValidation constant

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
The VBA Object browser does not list the value of the xlPasteType member: xlDataValidation. Does anyone know the decimal value of the constant? Creating a macro with this code does not show the value as well:
Sub Test
ActiveSheet.Cells(1,1).Value = xlDataValidation
End Sub
 
Ramil,

I found "xlPasteValidation" with a value of 6 in XL2002.
It is not available in XL97.

Regards,
Jim Cone
San Francisco, CA

Ramil said:
Hi all,
The VBA Object browser does not list the value of the xlPasteType member:
xlDataValidation. Does anyone know the decimal value of the constant? Creating
a macro with this code does not show the value as well:
 
Thanks Jim. It worked when I used 6. However, I am calling the formatting from a VB application and it takes a considerable amount of time to execute. On a sheet with 616 rows, I copied the data validation and pasted it to three (3) columns, the time to complete the process was 34 seconds. But from within Excel, the paste is immediate.
 
There is a known bug in XL97 and XL2K regarding PasteSpecial of Validation
and AllExceptBorders. Refer to the following MS Knowledge Base articles:

XL97: Problems with Arguments of PasteSpecial Method (Q171281)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q171281

XL97: Problems with Arguments of PasteSpecial Method (Q255520)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q255520

My preferred workaround is to declare the enum's as public:
Const xlPasteValidation = 6
Const xlPasteAllExceptBorders = 7

Hope this helps
James dot Becker at NCR dot com
 
Back
Top