Date: 02-16-2022
Return to Index
created by gbSnippets
Sub GridCopyCell
Local i,iCol,iRow As Long, temp$
i = SendMessage(hGrid, %MLG_GetSelected, 0, 0)
iCol = Hi(Word,i) : iRow = Lo(Word,i)
temp$ = MLG_Get(hGrid,iRow,iCol)
Clipboard Reset
Clipboard Set Text temp$
End Sub
Sub GridPasteCell
Local i,iRow,iCol As Long, temp$
i = SendMessage(hGrid, %MLG_GetSelected, 0, 0)
iCol = Hi(Word,i) : iRow = Lo(Word,i)
Clipboard Get Text To temp$
If Len(temp$) Then
MLG_Put hGrid, iRow, iCol, temp$, 1, 0
Else
MsgBoxX "Nothing to paste!", %MB_Ok + %MB_IconExclamation + %MB_TaskModal, "Paste Cell"
End If
End Sub
http://www.garybeene.com/sw/gbsnippets.htm