anhn: You were right. Those lines were of no use.
Would anyone know what .DoVerb and .Action are used for?
Also, I used si_the_geek code to clear the excel spreadsheet, here's the code:
...this is working fine. Just wondered if I'm missing a ".clear" method or something more effective. Meanwhile I'll stick with this.Code:LastRow = Ole1.Object.ActiveSheet.UsedRange.Rows.Count LastCol = Ole1.Object.ActiveSheet.UsedRange.Columns.Count For x = 1 To LastRow For y = 1 To LastCol Ole1.Object.ActiveSheet.Cells(x, y) = "" Next y Next x
Recap:
1- user uses my app to filter/modify/play with data.
2- user outputs that data to OLE spreadsheet in my app
3- user wants to take that data and bring it in his own excel spreadsheet
To do #3, the user enter the OLE excel spreadsheet (by double-cliking it) and manually copy the data by clicking the upperleft cell. Could this be automated?
Something like:
(I would then work the A1:J25 part more professionally as this would be dynamic - I could use .UsedRange method)Code:clipboard.settext = Ole1.Object.ActiveSheet.Range("A1:J25").Value
Edit:
This is interesting. I just tried this line of code. What it does is OPEN an instance of excel with my OLE spreadsheet data in it. That's almost it. I'd like that data to go to the clipboard, not to a new instance of excel.
Thanks for any feedback - you guys rocks.Code:myclip.SetText Ole1.Object.ActiveSheet.Copy




Reply With Quote