Consulting

Results 1 to 3 of 3

Thread: Simple question

  1. #1

    Simple question

    Hi guys,
    I have a simple VBA macro code question...
    I work with various reports-they are all in either excel or text format..

    I need a some simple code to getfile - open it, save the excel of text file as a variable - then paste into a seperate worksheet...

    One report has like 6 different spreadsheets/textfiles I copy and paste.....
    I have a macro to import and manipulate the text files.....
    If I can just get them imported all at once, I can do the rest...

    I would like a message box...
    It would like say...get file 1, get file 2, get file 3....etc...
    then press a button, macro button, to combine(copy/paste) all the files into the one spreadsheet....

    One other thing...
    We use excel 2003 and as yuo all know it is limited to ~65000 rows...
    Is there any way to break up a text file into smaller pieces?
    One text file is 5000 pages long, once i import it, sort it, etc, it has considerable less rows....so if i could import it in chuncks, sort it, then put it back together then re-import it as an excell file it would come in under the 65000 rows...

    thanks so so much in advance...

    Jeff

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Take a look at GetopenFilename in VBA help.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    For bringing in large files (with rows more than 65536), someone has already done hardwork with commented neat code.

    Take a look:
    http://www.cpearson.com/excel/ImportBigFiles.aspx
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

Posting Permissions

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