+ Reply to Thread
Results 1 to 4 of 4

How to copy cell from one workbook to another workbook and save it in the destination file

  1. #1
    Registered User
    Join Date
    06-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    8

    Post How to copy cell from one workbook to another workbook and save it in the destination file

    I want to make a interface in vb6 which deals with excel file. Where we can select drive from drive box and select a excel file which is a source file and copy the value of cell from the source file and paste it into destination file's cell. my problem is i want it dynamic mean i will take excel file, sheet and cell from user in runtime.

    > (this is the source excel file from where i want to copy the value of the cell)I m selecting excel file from filelistbox and then selecting a sheet from combobox where the sheets will b listed and then giving cell number from textbox and with d help of the command i show data that cell contains in a text box.

    >(this the destination file where i want to paste the cell value that i copied) again in same way i giving the destination file and sheet n cell . i want the code for a command button which will paste the value of copied cell to the destination cell. i tried many thing but nothing works.

    i made 2-3 function for copy cell but it doesnt work And i m using VB6

    this is my codehelp.jpg

    i attached a pic you will get the idea wat i want.......thank you in advance


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by sidhemu; 07-11-2013 at 02:42 AM. Reason: Use code tags in future.

  2. #2
    Registered User
    Join Date
    07-10-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: How to copy cell from one workbook to another workbook and save it in the destination

    try this,

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How to copy cell from one workbook to another workbook and save it in the destination

    Thnx for the reply .
    I always get this error Run-time error '1004'
    cannot access read-only file "xxx.xlsx"
    I tried many things but nothing works.
    Can you help in that i want to save and overwrite the file.

  4. #4
    Registered User
    Join Date
    07-10-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: How to copy cell from one workbook to another workbook and save it in the destination

    try this,

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1