Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default OLE Commands to Duplicate a Sheet

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default OLE Commands to Duplicate a Sheet

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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default OLE Commands to Duplicate a Sheet

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicate sheet, autonumber sheet, record data on another sheet des-sa[_2_] Excel Worksheet Functions 0 May 8th 08 06:56 PM
Excel 2007 duplicate icons for different commands T. Valko Excel Discussion (Misc queries) 8 January 27th 08 09:35 PM
in excel 2000 work sheet excel commands are showing how to rectif murthy Excel Worksheet Functions 1 November 17th 07 02:08 AM
Reset sheet tab menu commands Sparky13 Excel Discussion (Misc queries) 3 October 23rd 07 09:31 PM
Macro to Create Sheet & Duplicate Sheet Herve_Rob Excel Programming 1 June 7th 06 09:47 PM


All times are GMT +1. The time now is 12:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"