pbosek 0 Newbie Poster

My VB code has macros which imports a tab seperated text file selected by user into a standard excel template(work sheet). The import to excel is done by query tables. When the text file is chosen thru dialog box and resp commnad button is pressed, the handler opens the excel template, imports the macro module to 'import text file' into the excel, runs the macro and finally saves it to a name based on input text file before returning to VB main. The problem i am facing is the import to excel is taking too large(~1.5 min) for input text file of large size 1 to 4 Mb. But when i do this manually i.e. open excel, then data menu > import to text file and make settings, it takes few sec. This has become a performance issue in my tool. What could be the possible reason behind this large time delay? Can you pls let me know on how to improvise or make it faster?

thanks in advance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.