![]() |
|
Forum
|
|
|
#1 (permalink) |
|
XLDnaute Nouveau
Date d'inscription: octobre 2008
Messages: 2
|
Bonjour,
je suis bloqué pour un pb de débutant !! Set oExcel = CreateObject("Excel.Application") oExcel.Workbooks.Open(chemin_fichier & "\" & nom_fichier) oExcel.Workbooks(mon_fichier).Worksheets(1).Range( "A1:B5").Copy oExcel.Workbooks(mon_fichier).Worksheets(1).Range( Cells(1, 1), Cells(6, 2)).Copy Pourquoi avec la ligne verte ca marche et si je remplace par la ligne rouge ca plante ? (j'ai une erreur 1004 "Erreur définie par l'application ou par l'objet") merci pour votre aide!! |
|
|
|
| ANNONCES | |||
|
|
|
|
#2 (permalink) |
|
XLDnaute Barbatruc
Date d'inscription: avril 2008
Version Excel : Excel 2003 (PC)
Messages: 2 933
|
Bonjour olivierj75,
Cells se réfère par défaut à la feuille active essaye avec : Code:
With oExcel.Workbooks(mon_fichier).Worksheets(1) .Range(.Cells(1, 1), .Cells(6, 2)).Copy end With
__________________
C'est en Excellant qu'on devient Excelleron ?
|
|
|
|
![]() |
| Liens sociaux |
| Outils de la discussion | |
|
|
Discussions similaires
|
||||
| Discussion | Auteur | Forum | Réponses | Dernier message |
| Range(Cells(5, 10+i), Cells(k, 20+i)).Select | francois1955 | Forum Excel | 2 | 16/07/2008 08h28 |
| Problème avec Range(Cells(,),Cells(,)) | lebarbo | Forum Excel | 3 | 29/03/2008 12h49 |
| cells & range | sabrina64 | Forum Excel | 9 | 27/06/2007 18h42 |
| Range("r3:v3")<>.Range(Cells(3, 18), Cells(3, 22)) | carlos | Forum Excel | 3 | 28/03/2005 00h43 |
| range copy | La nueva | Forum Excel Downloads - Archives | 6 | 21/08/2003 18h02 |