Reply from Warren Herbert on Jan 16 at 7:15 PM If anyone can help here is what I've found. With MSFlexGrid1 'Select Full Contents (You could also select partial content) .Col = 0 'From first column .Row = 0 'From first Row (header) .ColSel = .Cols - 1 'Select all columns .RowSel = .Rows - 1 'Select all rows Clipboard.SetText .Clip 'Send to Clipboard End With The key words here is (you could also select partial content) so how would the code be to, say, select 1 row and not the header and the first 4 columns. Thanks Warren
| | | ---------------Original Message--------------- From: Warren Herbert Sent: Thursday, January 12, 2012 5:26 PM Subject: Exporting Single Feild, Cell from a Data Grid to Excel this is the code for getting the whole data grid to excel. objExcel.Range("d2").CopyFromRecordset frmExportGrid.dgrdExport.DataSource I am curious if we can break that down and export single cells. IE objExcel.Range("d2").CopyFromRecordset frmExportGrid.dgrdExport.DataSource(cell1) thanks Warren | | Reply to this email to post your response. __.____._ | _.____.__ |
No comments:
Post a Comment