Copie d'un simple texte en vba sous Access
Résolu/Fermé
picsoin
Messages postés
158
Date d'inscription
mardi 4 août 2009
Statut
Membre
Dernière intervention
24 juin 2023
-
3 févr. 2023 à 19:43
picsoin Messages postés 158 Date d'inscription mardi 4 août 2009 Statut Membre Dernière intervention 24 juin 2023 - 5 févr. 2023 à 22:27
picsoin Messages postés 158 Date d'inscription mardi 4 août 2009 Statut Membre Dernière intervention 24 juin 2023 - 5 févr. 2023 à 22:27
A voir également:
- Copie d'un simple texte en vba sous Access
- Copie cachée - Guide
- Transcription audio en texte word gratuit - Guide
- Iphone 14 simple - Guide
- Copie écran samsung - Guide
- Mettre un texte en majuscule - Guide
2 réponses
yg_be
Messages postés
23509
Date d'inscription
lundi 9 juin 2008
Statut
Contributeur
Dernière intervention
1 avril 2025
Ambassadeur
1 574
3 févr. 2023 à 20:01
3 févr. 2023 à 20:01
bonjour,
peut-être
Private Sub testhello() Call wc("heelo world") End Sub Private Sub wc(txt As String) Dim x As Variant, hf x = txt Set hf = CreateObject("htmlfile") hf.parentWindow.clipboardData.setData "text", x MsgBox "Le texte suivant a été inséré dans le presse papier: """ + txt + """" End Sub
picsoin
Messages postés
158
Date d'inscription
mardi 4 août 2009
Statut
Membre
Dernière intervention
24 juin 2023
5
3 févr. 2023 à 20:11
3 févr. 2023 à 20:11
Merci, j'vais essayer ça, mais je n'ai pas besoin de la MsgBox
3 févr. 2023 à 21:32
J'ai oublié de dire que je clic sur un bouton dans un formulaire.
Du coup moi ça commence comme ça
Private Sub Btn_TXT1_Click()
Call wc("heelo world")
End Sub
Et là, quand je compile access me dit Erreur de compilation: sub ou Fonction non défini
4 févr. 2023 à 14:34
Peux-tu partager ton code adapté?
Modifié le 5 févr. 2023 à 22:35
Merci et grâce à toi celui-ci est fonctionnel
Private Sub Btn_TXT1_Click()
Dim x As Variant, hf
x = "test"
Set hf = CreateObject("htmlfile")
hf.parentWindow.clipboardData.setData "text", x
End Sub