Kopieren von Worksheets

Hay, will mal sehen, ob das hier auch funktioniert (vielleicht sogar in deutsch). Ich habe grosse Probleme beim Erstellen von Excel-Controls. Wie kann man z.B. ein vorhandenes Worksheet in ein neues kopieren? Hat jemand eine Idee?? Sven Klawitter

For those who didn’t understand the Question. It reads: “How can I copy a Worksheet”. Example: I want to copy worksheet number 4 three times, thus having copies as WS numbers 5, 6 and 7 xlWorksheet := xlSheets.Item(4); For i := 1 To 3 do xlWorksheet.copy(xlWorksheet); — xlWorksheet : ‘Microsoft Excel 9.0 Object Library’.Worksheet xlSheets : ‘Microsoft Excel 9.0 Object Library’.Sheets — General remark: This is an english speaking forum. You generally have better chances to have your questions answered if you post them in english. (Auch wenn der absolut geilste Excel-Spezialist - nämlich ich - deutsch spricht ) That’s it Marcus Fabian phone: +41 79 4397872 m.fabian@thenet.ch

Sven, jawohl, Sie sehen: es wirkt, aber wir allen haben versprochen hier nur English zu benutzen. Auch wann ein Schweizer (Marcus) oder ein Hollaender (ich) die Frage verstehen und beantworten koennen (Translation: Please use English) Furthermore, as a general hint for working with Excel or Word automation: Very often the macro recorder (VBA module) of Excel can show you how to solve a problem, or how to do an action, programmatically. Start Macro recording, do the action you want to do, then look at the macro code what it took to get it done. It will show you the properties and methods accessed, set or read - making it a lot easier to create similar code in C/AL. Be aware that many things are set by using predefined Constants in VBA. The value of such Constant, recognizable by a name starting with xls or wrd can be found by calling up the References list in the VBA editor. You have seen the extensive list with sample Excel code already? If not, just look for it in this forum (can’t remember the exact section now… was it Tips & Tricks, or FAQ, or what… well, just do some searching - it’s there). John John