OVH Cloud OVH Cloud

Question existentielle mais qui m'ennuie.

5 réponses
Avatar
Philippe
Bonjour,


Voici ma question. Pourquoi :

... Excel interprete les codes suivant correctement :

Application.screenupdating=false
Application.calculation=xlautomatic
Application.cutcopymode=false

... mais n'rrive pas à interpréter :

Application.cutcopymode=xlcopy


ca m'énerve enormement depuis ce matin alors que je ferai mieux d'aller
faire un tour dehors. En gros, je voudrais redonner le scintillement de la
cellule que l'on vient de copier quand cette dernière ne scintille plus (je
vie un véritable drame humain n'est ce pas ?)

Merci d'avances aux bons samaritains.

Philippe.

5 réponses

Avatar
Pierre CFI [mvp]
bonjour
oui, je comprend ton angoisse, et je voudrais pas étre à ta place :o)
Mais si le presse papier a été vidé ? donc il faut re copier

--
Pierre CFI
MVP Microsoft Access
Mail : http://cerbermail.com/?z0SN8cN53B

Site pour bien commencer
Access http://users.skynet.be/mpfa/
Excel http://www.excelabo.net

"Philippe" a écrit dans le message de news:

Bonjour,


Voici ma question. Pourquoi :

... Excel interprete les codes suivant correctement :

Application.screenupdatingúlse
Application.calculation=xlautomatic
Application.cutcopymodeúlse

... mais n'rrive pas à interpréter :

Application.cutcopymode=xlcopy


ca m'énerve enormement depuis ce matin alors que je ferai mieux d'aller
faire un tour dehors. En gros, je voudrais redonner le scintillement de la
cellule que l'on vient de copier quand cette dernière ne scintille plus (je
vie un véritable drame humain n'est ce pas ?)

Merci d'avances aux bons samaritains.

Philippe.





Avatar
Philippe
Bonjour Pierre,

Je te remercie de ta compréhension mais tu arrives pile poil à l'endroit
Alors c'est ça m'énerve : j'avais pris soin de reconstituer le presse-papier
(Utilisant les méthodes "GetFromClipboard" & "PutinClipboard")

Donc, si je fais un clic droit, coller n'est pas grisé => si Excel ne tient
pas à m'énerver, il se doit de réagir dans le plus bref délai, non ?

Enfin..., tout parce que la moindre ligne de code anéantit le presse-papier
=> je suis surpris que pas plus de gens se soient posés la question (KB,
google, ... => rien du tout)

Merci quand même, Pierre, et à bientôt.




bonjour
oui, je comprend ton angoisse, et je voudrais pas étre à ta place :o)
Mais si le presse papier a été vidé ? donc il faut re copier

--
Pierre CFI
MVP Microsoft Access
Mail : http://cerbermail.com/?z0SN8cN53B

Site pour bien commencer
Access http://users.skynet.be/mpfa/
Excel http://www.excelabo.net

"Philippe" a écrit dans le message de news:

Bonjour,


Voici ma question. Pourquoi :

... Excel interprete les codes suivant correctement :

Application.screenupdatingúlse
Application.calculation=xlautomatic
Application.cutcopymodeúlse

... mais n'rrive pas à interpréter :

Application.cutcopymode=xlcopy


ca m'énerve enormement depuis ce matin alors que je ferai mieux d'aller
faire un tour dehors. En gros, je voudrais redonner le scintillement de la
cellule que l'on vient de copier quand cette dernière ne scintille plus (je
vie un véritable drame humain n'est ce pas ?)

Merci d'avances aux bons samaritains.

Philippe.










Avatar
Pierre CFI [mvp]
"PutinClipboard" uniquement dans excel 2004 :o)

--
Pierre CFI
MVP Microsoft Access
Mail : http://cerbermail.com/?z0SN8cN53B

Site pour bien commencer
Access http://users.skynet.be/mpfa/
Excel http://www.excelabo.net

"Philippe" a écrit dans le message de news:

Bonjour Pierre,

Je te remercie de ta compréhension mais tu arrives pile poil à l'endroit
Alors c'est ça m'énerve : j'avais pris soin de reconstituer le presse-papier
(Utilisant les méthodes "GetFromClipboard" & "PutinClipboard")

Donc, si je fais un clic droit, coller n'est pas grisé => si Excel ne tient
pas à m'énerver, il se doit de réagir dans le plus bref délai, non ?

Enfin..., tout parce que la moindre ligne de code anéantit le presse-papier
=> je suis surpris que pas plus de gens se soient posés la question (KB,
google, ... => rien du tout)

Merci quand même, Pierre, et à bientôt.




bonjour
oui, je comprend ton angoisse, et je voudrais pas étre à ta place :o)
Mais si le presse papier a été vidé ? donc il faut re copier

--
Pierre CFI
MVP Microsoft Access
Mail : http://cerbermail.com/?z0SN8cN53B

Site pour bien commencer
Access http://users.skynet.be/mpfa/
Excel http://www.excelabo.net

"Philippe" a écrit dans le message de news:

Bonjour,


Voici ma question. Pourquoi :

... Excel interprete les codes suivant correctement :

Application.screenupdatingúlse
Application.calculation=xlautomatic
Application.cutcopymodeúlse

... mais n'rrive pas à interpréter :

Application.cutcopymode=xlcopy


ca m'énerve enormement depuis ce matin alors que je ferai mieux d'aller
faire un tour dehors. En gros, je voudrais redonner le scintillement de la
cellule que l'on vient de copier quand cette dernière ne scintille plus (je
vie un véritable drame humain n'est ce pas ?)

Merci d'avances aux bons samaritains.

Philippe.












Avatar
michdenis
Bonjour Philippe,

Je reproduit une page de l'excellent site internet


Désolé, pour ceux qui auraient des problèmes avec l'anglais !

Salutations!

*********************************************
http://www.cpearson.com/excel/clipboar.htm

This page describes various methods in Visual Basic For Applications (VBA)
for copying data to and retrieving data from the Windows clipboard.

To copy data directly from a worksheet cell to the Windows clipboard,
you can use the COPY method of the Range object, e.g., Range("A1").Copy.
However, copying other data to the clipboard, such as variable, cell comments,
sheet names, etc, is not as simple as it might be.

VBA does not give you generic PutOnClipboard or GetOffClipboard procedures,
so we'll create them here. Along the way, we'll look at how VBA does
interact with the Windows clipboard.

Because these procedures use the DataObject variable type, you must have a
reference set in your VBA project to the Microsoft Forms 2.0 object library.
Copying To The Clipboard

To access the Windows Clipboard from VBA, you must go through an intermediate
object of the DataObject type. If your VBA procedure will be working with the
clipboard, declare a NEW DataObject object with the following statement.
Dim MyDataObj As New DataObject

The SetText method of the DataObject variable is used to store a text string
or numeric value in the variable For example:
MyDataObj.SetText "This Is A Text String" Or
MyDataObj.SetText 123.456

This sets the contents of MyDataObj to a value. To copy the contents
of the variable MyDataObj to the Windows clipboard, use the PutInClipboard method.
MyDataObj.PutInClipboard
Pasting From The Clipboard
To retrieve the contents of the clipboard, use the following statement:
MyDataObj.GetFromClipboard
This sets the contents of MyDataObj to the contents of the Windows clipboard.
The counterpart to the SetText method is the GetText method.
This method returns the contents of DataObject to another variable.
For example,

Dim MyVar As Variant
MyVar = MyDataObj.GetText

Using this knowledge, we can create the following VBA procedures:

Cette bibliothèque doit être chargé.
"Microsoft Forms 2.0 object librairy"


Public Sub PutOnClipboard(Obj As Variant)
Dim MyDataObj As New DataObject
MyDataObj.SetText Format(Obj)
MyDataObj.PutInClipboard
End Sub


Public Function GetOffClipboard() As Variant
Dim MyDataObj As New DataObject
MyDataObj.GetFromClipboard
GetOffClipboard = MyDataObj.GetText()
End Function

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

I use these formulas quite often to place the formula of the active cell on
to the clipboard, to allow cut and paste operations without Excel changing
any cell references. You may find it useful to link them to command items
on your right click menu.

Sub CopyFormula()
Dim x As New DataObject
x.SetText ActiveCell.Formula
x.PutInClipboard
End Sub

Sub PasteFormula()
On Error Resume Next
Dim x As New DataObject
x.GetFromClipboard
ActiveCell.Formula = x.GetText
End Sub

*********************************************


Salutations!





"Philippe" a écrit dans le message de news:

Bonjour Pierre,

Je te remercie de ta compréhension mais tu arrives pile poil à l'endroit
Alors c'est ça m'énerve : j'avais pris soin de reconstituer le presse-papier
(Utilisant les méthodes "GetFromClipboard" & "PutinClipboard")

Donc, si je fais un clic droit, coller n'est pas grisé => si Excel ne tient
pas à m'énerver, il se doit de réagir dans le plus bref délai, non ?

Enfin..., tout parce que la moindre ligne de code anéantit le presse-papier
=> je suis surpris que pas plus de gens se soient posés la question (KB,
google, ... => rien du tout)

Merci quand même, Pierre, et à bientôt.




bonjour
oui, je comprend ton angoisse, et je voudrais pas étre à ta place :o)
Mais si le presse papier a été vidé ? donc il faut re copier

--
Pierre CFI
MVP Microsoft Access
Mail : http://cerbermail.com/?z0SN8cN53B

Site pour bien commencer
Access http://users.skynet.be/mpfa/
Excel http://www.excelabo.net

"Philippe" a écrit dans le message de news:

Bonjour,


Voici ma question. Pourquoi :

... Excel interprete les codes suivant correctement :

Application.screenupdatingúlse
Application.calculation=xlautomatic
Application.cutcopymodeúlse

... mais n'rrive pas à interpréter :

Application.cutcopymode=xlcopy


ca m'énerve enormement depuis ce matin alors que je ferai mieux d'aller
faire un tour dehors. En gros, je voudrais redonner le scintillement de la
cellule que l'on vient de copier quand cette dernière ne scintille plus (je
vie un véritable drame humain n'est ce pas ?)

Merci d'avances aux bons samaritains.

Philippe.










Avatar
Philippe
Merci messiers pour vos lumières. pour la peine, je vais tenter de résoudre
quelques posts.


Bonjour Philippe,

Je reproduit une page de l'excellent site internet


Désolé, pour ceux qui auraient des problèmes avec l'anglais !

Salutations!

*********************************************
http://www.cpearson.com/excel/clipboar.htm

This page describes various methods in Visual Basic For Applications (VBA)
for copying data to and retrieving data from the Windows clipboard.

To copy data directly from a worksheet cell to the Windows clipboard,
you can use the COPY method of the Range object, e.g., Range("A1").Copy.
However, copying other data to the clipboard, such as variable, cell comments,
sheet names, etc, is not as simple as it might be.

VBA does not give you generic PutOnClipboard or GetOffClipboard procedures,
so we'll create them here. Along the way, we'll look at how VBA does
interact with the Windows clipboard.

Because these procedures use the DataObject variable type, you must have a
reference set in your VBA project to the Microsoft Forms 2.0 object library.
Copying To The Clipboard

To access the Windows Clipboard from VBA, you must go through an intermediate
object of the DataObject type. If your VBA procedure will be working with the
clipboard, declare a NEW DataObject object with the following statement.
Dim MyDataObj As New DataObject

The SetText method of the DataObject variable is used to store a text string
or numeric value in the variable For example:
MyDataObj.SetText "This Is A Text String" Or
MyDataObj.SetText 123.456

This sets the contents of MyDataObj to a value. To copy the contents
of the variable MyDataObj to the Windows clipboard, use the PutInClipboard method.
MyDataObj.PutInClipboard
Pasting From The Clipboard
To retrieve the contents of the clipboard, use the following statement:
MyDataObj.GetFromClipboard
This sets the contents of MyDataObj to the contents of the Windows clipboard.
The counterpart to the SetText method is the GetText method.
This method returns the contents of DataObject to another variable.
For example,

Dim MyVar As Variant
MyVar = MyDataObj.GetText

Using this knowledge, we can create the following VBA procedures:

Cette bibliothèque doit être chargé.
"Microsoft Forms 2.0 object librairy"


Public Sub PutOnClipboard(Obj As Variant)
Dim MyDataObj As New DataObject
MyDataObj.SetText Format(Obj)
MyDataObj.PutInClipboard
End Sub


Public Function GetOffClipboard() As Variant
Dim MyDataObj As New DataObject
MyDataObj.GetFromClipboard
GetOffClipboard = MyDataObj.GetText()
End Function

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

I use these formulas quite often to place the formula of the active cell on
to the clipboard, to allow cut and paste operations without Excel changing
any cell references. You may find it useful to link them to command items
on your right click menu.

Sub CopyFormula()
Dim x As New DataObject
x.SetText ActiveCell.Formula
x.PutInClipboard
End Sub

Sub PasteFormula()
On Error Resume Next
Dim x As New DataObject
x.GetFromClipboard
ActiveCell.Formula = x.GetText
End Sub

*********************************************


Salutations!





"Philippe" a écrit dans le message de news:

Bonjour Pierre,

Je te remercie de ta compréhension mais tu arrives pile poil à l'endroit
Alors c'est ça m'énerve : j'avais pris soin de reconstituer le presse-papier
(Utilisant les méthodes "GetFromClipboard" & "PutinClipboard")

Donc, si je fais un clic droit, coller n'est pas grisé => si Excel ne tient
pas à m'énerver, il se doit de réagir dans le plus bref délai, non ?

Enfin..., tout parce que la moindre ligne de code anéantit le presse-papier
=> je suis surpris que pas plus de gens se soient posés la question (KB,
google, ... => rien du tout)

Merci quand même, Pierre, et à bientôt.




bonjour
oui, je comprend ton angoisse, et je voudrais pas étre à ta place :o)
Mais si le presse papier a été vidé ? donc il faut re copier

--
Pierre CFI
MVP Microsoft Access
Mail : http://cerbermail.com/?z0SN8cN53B

Site pour bien commencer
Access http://users.skynet.be/mpfa/
Excel http://www.excelabo.net

"Philippe" a écrit dans le message de news:

Bonjour,


Voici ma question. Pourquoi :

... Excel interprete les codes suivant correctement :

Application.screenupdatingúlse
Application.calculation=xlautomatic
Application.cutcopymodeúlse

... mais n'rrive pas à interpréter :

Application.cutcopymode=xlcopy


ca m'énerve enormement depuis ce matin alors que je ferai mieux d'aller
faire un tour dehors. En gros, je voudrais redonner le scintillement de la
cellule que l'on vient de copier quand cette dernière ne scintille plus (je
vie un véritable drame humain n'est ce pas ?)

Merci d'avances aux bons samaritains.

Philippe.