hi, i have a vb6.0 application, and im using a flexGrid control, and i can select as many cells as i want, but how can i copy my selection so the user can paste it in excel as use it as he wishes??
can it be done with a datagrid as well??
Use the Clipboard object in the Flexgrid keypress event:
Private Sub fg_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = 3 Then ' Ctrl-C
Clipboard.Clear
Clipboard.SetText fg.Clip, flexCFText
End If
End Sub
You'll be able to paste in Excel etc with Ctrl-V
Mark
"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
Hi! That's great!. But what about the cherry over the cake?. Is there any way to copy to the clipboard the selected cell range including cell attributes, vgr foreground and Background colors, font, fontsize ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.