Results 1 to 2 of 2

Thread: excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2004
    Posts
    2

    excel

    Hi im really struggling with this and was wondring is anyone was able to help.

    I have a form in VB6 the is able to open an excel file by selection. I need to copy parts of that file in to a new excel file that is to be created using vb. Only specific cells are to be inserted in to the new file. Does anyone know how to do this please?

    Any help will be greatly appreciated.
    Thanks
    Faye

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Thats a bit vague.

    Are the 'bits' rows, columns, only certain sections?
    Are the bits easily identifyable?

    1) you need to select the file
    2) open an excel application (other posts in these forums on how to do that)
    3) open the file in the excel you opened
    4) move to the right sheet or go through each sheet searching for the easily identifyable bit
    5) process said bit and output to a new spreadsheet (you could open the new workbook/sheet as you open the user selected one)
    6) save output sheet
    7) close both files, then close excel
    8) clear all references to objects used


    In Excel, you can use tools>macros>record macro
    to get a general gist of what you need to use via code.

    Once you have some code, post up if you are having problems.

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

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



Click Here to Expand Forum to Full Width