I am trying to copy the format of an Cell say here "A1" to the all cells of the first row using VBScript,but getting an error xlValues
is not defined.
CODE
ob3.Range("A1").Copy
ob3.Range("A1").EntireRow.PasteSpecial(xlValues) 'error here for that constants
Can you help me here?
Thanks,
try:
You can find a list of constants here: http://techsupt.winbatch.com/ts/T000001033005F9.html
These are for Excel 97 but in your case (xlValues) the constant hasn't changed (-4163).
With
you shouldn't get an error anymore
As VBScript does not know about Excel's constant, you'll have to define them yourself: