+ Reply to Thread
Results 1 to 19 of 19

Open Excel file with filedialog and copy it into sheet 2

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Open Excel file with filedialog and copy it into sheet 2

    HI I have now an working macro to open csv file and copy it into sheet 2 as an excel file

    Its working perfect and i can edit in the file.And search

    For people at my work i would not like them to have this option.
    But i would like them to be able to open the edited excel file and copy it into sheet 2.

    So they can search from there.

    When i open the csv file and copy it into sheet2 it looks like this.

    So how can i make a new one similar, so they can open the excel file, and copy it to sheet 2?

    I have my search option in sheet1 and its perfect

    My Code for opening the csv file in sheet 2 is:
    Please have a look, how i can make one similar but for the opening of excel files, and copy it to sheet2

    Thanks in advance

    Sincerely
    Abjac

    Please Login or Register  to view this content.
    Last edited by arlu1201; 08-08-2012 at 05:52 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Open Excel file with filedialog and copy it into sheet 2

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Open Excel file with filedialog and copy it into sheet 2

    I'm sorry, but my english in not very good, i'm not understanding what you want.

    Don't use tag [code] for normal text, use only for code

  6. #6
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    Ok Sorry Patel i will tell in other way ok

    1. I want to open an excelfile(big 65000 Rows) With an macro(Button)
    "Openfiledialog select file"
    2. Then i want to have a button, like before to search for word.
    "Search text in open excelfile"
    When it find the rows with the "Found Rows with text i put in",
    copy all rows to new sheet2 in same workbook

    Before i use this code, but now not work, because
    when i open excelfile, it has name( not sheet2)

    No reason to copy excelfile(from Open filedialog) to new sheet. I just need to open it
    But i need to copy found rows with "found text" to new sheet.

    Summary:

    1.One Button for openfiledialog("Select excelfile to open")
    2. Onebutton for Search for text in openfile(Insensitive) and
    copy found rows to seperate sheet(Sheet2), same workbook

    Please have a look

    My Old code to "find text" in rows are this:

    Please Login or Register  to view this content.
    Or Better Patal see attachments. This is how it shall work. Thanks
    Attached Files Attached Files
    Last edited by abjac; 08-09-2012 at 04:15 AM.

  7. #7
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Open Excel file with filedialog and copy it into sheet 2

    Quote Originally Posted by abjac View Post
    No reason to copy excelfile(from Open filedialog) to new sheet. I just need to open it
    For you no reason, but are you able to do in this way ?
    I'm not. I also don't like the idea of the 3 buttons, there is a problem after file opening

    edit:
    test attached file
    Attached Files Attached Files
    Last edited by patel45; 08-09-2012 at 09:19 AM.

  8. #8
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    HI Patel. This is working Perfect. The idea with 2 buttons is fine. I have added one more button for arrange
    Sheet3. Columnwith, headline. and so on

    Have a look and see if you think this is ok.
    '
    Thanks alot

    Sincerely
    Abjac
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    HI Also Patel
    If i want to search multi files and paste Sheet3
    How to do?
    I open excel file. Find with word and it paste Sheet3.
    close excelfile.
    Open next excelfile. FInd with word And paste Sheet3 in first emty cell. After first search?
    How tp do that?

    Thanks in advance
    Sincerely Abjac

  10. #10
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Open Excel file with filedialog and copy it into sheet 2

    in module 2
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    HI Patel. Its work Perfect, Perfect. I can open 4 files(65000 Rows each) And save result in one file.

    This is perfect. Thanks alot.

    One thing

    Have a look at file.

    How can i
    Save Sheet3 (GetSaveAsFilename) Savefiledialog(Would like to choose with safefiledialog)
    Close Sheet3( Saved)
    Close SearchAllTransActions(Workbook) With no changes

    All with one button "Save Sheet3"

    All is working, but not with savefiledialog

    I send you file have a look and see i you can find out please.

    P.s File 59 kb is the last one

    Thanks alot
    Sincerely Abjac
    Attached Files Attached Files
    Last edited by abjac; 08-10-2012 at 04:34 AM.

  12. #12
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Open Excel file with filedialog and copy it into sheet 2

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    Hi Patel.,
    Nearly working
    But SaveFileDialog comes 2 times for safe.
    Try file
    Please have a look if you can change so only 1 time.

    Error message also not work "MsgBox Not found, Try again with another search Word"

    Try with excel file Test Sheet search for other word than "mail"
    No error message

    Hope you can fix it.



    Thanks in advance

    Sincerely Abjac
    Attached Files Attached Files
    Last edited by abjac; 08-10-2012 at 07:30 AM.

  14. #14
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Open Excel file with filedialog and copy it into sheet 2

    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    HI Patel This is perfect perfect. Works so good thanks alot

    Only the message "MsgBox Not found, Try again with another search Word"

    Not work, the only thing not work

    Try file Test Sheet.xls type "working" and no msgBox come

    If you can solve this, will all be perfect

    Thanks in advance
    Sincerely Abjac

  16. #16
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Open Excel file with filedialog and copy it into sheet 2

    modify so:
    Please Login or Register  to view this content.
    instead
    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    HI Patel. Its working 100%. So thank you thank you. Its so great and i really appriciate this.
    Will use this macro alot, so really great.
    Your the best, so many good answers and so fast. Thanks alot Patel for all this work

    Sincerely Abjac

  18. #18
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    HI Patel. Could you have a look at this one. A new thread, but a cotinue of one you helped me with before.

    Please have a look at this new thread

    Thanks
    Thread name:

    Create Search In Excel for Amount/value columm B

  19. #19
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open Excel file with filedialog and copy it into sheet 2

    Hi Patel. If you have time could you have a look at this new thread. I need this to find a match in a column of invoice values at my work.

    http://www.excelforum.com/excel-prog...html?p=3007268

    Please have a look if you have time

    Thanks

    Abjac

+ 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