Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1906 connectés 

 


Dernière réponse
Sujet : VBA / Access /clipboard
ricoco merci de m'avoir montré la voie  
je continue mon bonhomme de chemin avec le clipboard !
:hello:
 
je cherche tjs  sur le net au cas ou ... des liens interessants
 
http://www.cathyastuce.com/index.htm
http://www.namani.net/
 
http://www.excel-vba-access.com/access/index.htm
http://www.barasch.com/excel/xlvba.htm

Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
ricoco merci de m'avoir montré la voie  
je continue mon bonhomme de chemin avec le clipboard !
:hello:
 
je cherche tjs  sur le net au cas ou ... des liens interessants
 
http://www.cathyastuce.com/index.htm
http://www.namani.net/
 
http://www.excel-vba-access.com/access/index.htm
http://www.barasch.com/excel/xlvba.htm
cerdoc bon désoled j'ai pas trouved , enfin ça marche pas
 
j'ai esayer ça :

Private Declare Function SetClipboardData Lib "user32" Alias "SetClipboardDataA" (ByVal wFormat As Long, ByVal hMem As Long) As Long
Private Declare Function GetClipboardData Lib "user32" Alias "GetClipboardDataA" (ByVal wFormat As Long) As Long
Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function CloseClipboard Lib "user32" () As Long
 
Private Declare Function EmptyClipboard Lib "user32" () As Long
Private Declare Function LocalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal wBytes As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
 
Private Sub main()
 
 
Dim ptrS As Long
 
 
Dim f As String
f = "glut?"
ptrS = LocalAlloc(0, Len(f))
CopyMemory ptrS, f, Len(f)
 
 
OpenClipboard vbNull
 
SetClipboardData 1, ptrS
 
MsgBox GetClipboardData(1)
 
CloseClipboard
 
End Sub
 

 
l'utilisation des API windows est la voie vers la solution a ton probleme car VBA ne connait pas l'objet clipboard.
 
par contre mon prog marche pas , il me dit qui trouve pas la déclaration SetClipboarddata dans user32.dd
 
bon courage
ricoco :)
cerdoc m**** moi c'est en VB et pas VBA , wait j'installe office
ricoco :sweat:
t'as réussi à faire marché ton exemple sous Access ? (j'ai la verison 97 SR2)
cerdoc pour mettre dans le clipboard:
 
Clipboard.SetText "glut?", vbCFText
 
pour récuperer cette chaine

dim sqlstring as string
sqlstring = Clipboard.GetText(vbCFText)
ricoco en VBA sous Access
j'ai une variable nommée sqlstring qui contient une chaine de caractères
j'aimerais récupérer cette chaine de caractère dans le presse papier connaissez-vous la procédure en VBA ?
 
:jap:

Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)