It's probably an issue with Windev. This is different than the OLE I am
familiar with, which is basically how one VBA program accesses objects in
another. However, you should try variations on the syntax CoRrRaN provided:
MySheetXLSCopy(MySheetXLS)
Check the Excel object model to see what the arguments for Copy are for a
worksheet, and use the appropriate syntax for Windev. For example, how do
you have to deal with optional arguments or named arguments?
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
wrote in message
ups.com...
Thanks to answer me.
But, this command do not work in my software. I use an externel
software ( WINDEV) which use OLE to control EXCEL.
Do you know another command to do the same things?
A command without space?
All command OLE in my software contains no space, and are like this:
MySheetXLSRange("A1:"+AEZ+"1")Select()
MySheetXLSSelectionCopy()
MySheetXLSRange("AE52")Select()
MySheetXLSActiveSheetPaste()
Pierre
On 25 jan, 14:44, CoRrRan wrote:
ActiveSheet.Copy After:=ActiveSheet
Change both "ActiveSheet"s to whatever you need.
HTH, CoRrRan
wrote in news:1169731477.999176.216060
@s48g2000cws.googlegroups.com:
Hi, I would like to know how duplicate a Sheet in excel.
I know only how create a new sheet : xExcelSheetsAdd()
I tried to copy the sheet, create a new sheet, and paste, but it
doesn't work, because Excel display a prompt.
Excel ask if I want to save my copy in clipboard , because the copy is
too important.
Could anyone help me with the correct OLE commands to duplicate a
sheet? An
example program would be great if anyone has one.
Many thanks,
Pierre