Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 26th, 2005, 02:52 PM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Copying Multiple Rows in MS Excel 2K using VB .Net

Hi All!

I am using MS Excel Object in my VB .Net code and trying to copy the user-selected cells (may be multiple cells) into the clipboard. So far, I have been unsuccessful to get it done. Can any one of you please let me know if it is doable, if so then how?

In order to provide this functionality in my application, I have a form which has an embedded window for Excel and a button to "Copy-Paste" the user selected rows from the Excel document into a Word document.

In nut-shell, I am unable to copy the user selected cells/ rows/ columns from MS Excel into the clipboard.

Best regards,

Azhar
 
Old January 27th, 2005, 07:48 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can't you define an array made up of the cell dimensions then pass the values from Excel range to your destination application. Replicating the copy paste process?

Cheers

Matthew

 
Old January 27th, 2005, 10:04 AM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Matthew!

Thanks for your reply. The scenario is a bit different than what you are talking about. I am selecting few cells from the interface by just clicking on the first cell, and then clicking on the other one while pressing shift key. I can even select a picture on the work sheet. Now, if I do CTRL + C or just select COPY option from the Edit Menu, all my selections are copied in the clipboard (which is quite normal). At this point, I want to put my application button which should work like CTRL + COPY or just copy my selections into the clipboard, through code only. As I mentioned earlier, Excel is embedded in my app using Framer control that I got from MSDN site. I have EXCEL object in the code and WORD object as well. I hope this description is clear to you now.

Thanks

Azhar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Export data to MS Excel in VB.NET DPARK0312 General .NET 1 December 9th, 2013 03:06 AM
update mulitple rows in SQL 2K danastasio Classic ASP Databases 2 January 16th, 2007 12:14 PM
Copying Rows to New worksheet eusanpe Excel VBA 7 December 21st, 2006 10:23 AM
Copying Multiple Rows raj_phoenix Excel VBA 3 May 6th, 2005 03:58 AM
MS Excel number of rows issue sri2004 Classic ASP Databases 0 June 17th, 2003 07:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.