URGENT !! Automating Excel (Office 97)
Hi,
I am automating Ms Excel (Office 97) from Vb .NET.
Everything works fine except...
I need to use the "paste special" functionality of Ms Excel from VB. The simple paste works ...
eg; xlsheet.selection.paste()
but in the case below, the code gives error..
xlsheet.Selection.PasteSpecial(Paste:="xlValues", Operation:="xlNone", SkipBlanks:=False, Transpose:=False)
The error is :-
"An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in microsoft.visualbasic.dll
Additional information: PasteSpecial method of Range class failed"
I don't have a clue as to why it is coming...
every other thing like 'selection.copy' and 'selection.paste' is working.
need help urgently.
Thanks
rajtofar
REAL USERS HATE REAL PROGRAMMERS
Please Have you got any reply
:rolleyes:
Hello,
Please, have you got a reply to your problem?
In fact, actually I have this same problem. I am using office 2k
and VB6.
I want to use Excel paste special xlPasteValues, then xlPasteFormats.
I use this to delete formulas from existing spread sheets.
Thanks a lot.
Hichem.