ActiveDatabase.Selection.Copy ' optionnel oAppExcel.Visible = True
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionActiveDatabase.TaskWindows(fpTaskWindowObjectList).Activate ActiveDatabase.Selection.SelectObject "Data" ActiveDatabase.Selection.Copy Databases("\\monchemin\modele.FPD").Activate ActiveDatabase.TaskWindows(fpTaskWindowObjectList).Activate
ActiveDatabase.Selection.Copy
- soit cette syntaxe n'est pas la bonne
- soit elle ne met rien dans le presse-papiers de Windows (et n'alimente qu'un "tampon" Flexpro !
- soit dépassement de 911 caractères
Private Declare Function GetClipboardData Lib "user32" (ByVal wFormat As Long) As Long Private Declare Function CloseClipboard Lib "user32" () As Long Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As Long) As Long Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Long, ByVal ByteLen As Long)
oAppExcel.ActiveWorkbook.Worksheets("Feuil1").Range("B5").PasteSpecial (xlPasteValues)
Dim hStrPtr As Long, lLength As Long, sBuffer As String OpenClipboard 0 hStrPtr = GetClipboardData(1) If hStrPtr <> 0 Then lLength = lstrlen(hStrPtr) If lLength > 0 Then sBuffer = Space$(lLength) CopyMemory ByVal sBuffer, ByVal hStrPtr, lLength oAppExcel.ActiveWorkbook.Worksheets("Feuil1").Range("B5").Value = sBuffer End If End If CloseClipboard
ActiveDatabase.Selection.Copy