Try this then...

Sub Data_Merge_From_All_Files_SelectFolder_NO_ADO()
Dim bookList As Workbook
Dim FileName As Variant
Dim n As Long

FileName = Application.GetOpenFilename(filefilter:="Excel Files (*.xl*),
*.xl*", MultiSelect:=True)
Application.ScreenUpdating = False

For n = LBound(FileName) To UBound(FileName)
Set bookList = Workbooks.Open(FileName(n))
Range("A2:Q50" & Range("A65536").End(xlUp).Row).Copy
ThisWorkbook.Worksheets(1).Activate
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False

Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
bookList.Close
Next n
Application.ScreenUpdating = True

MsgBox "Done!!"

End Sub


Cheers!!

+++++
*I did not do this for you. God is here working through me for you.*

On Tue, Dec 23, 2014 at 12:49 PM, Zafar Iqbal <ziqba...@gmail.com> wrote:

> Dear Vaibhav Joshi, Now, It working excellently. It is fulfilling my
> request's one part. Thanks for it. It is copying data from all files in
> selected folder. Can you make it more flexible to select one or more files
> with shift/ctrl keys, please?
>
> ---------------------------------------------------------------
>
> On Tue, Dec 23, 2014 at 10:10 AM, Vaibhav Joshi <v...@vabs.in> wrote:
>
>> Hi
>>
>> Add this line before Set filesObj = dirObj.Files
>> Set dirObj = mergeObj.Getfolder(dirObj.self.Path)
>>
>> Cheers!!
>>
>>
>> +++++
>> *I did not do this for you. God is here working through me for you.*
>>
>> On Tue, Dec 23, 2014 at 12:40 AM, Zafar Iqbal <ziqba...@gmail.com> wrote:
>>
>>> Dear Vaibhav Joshi, I checked it and found it working till selection of
>>> Folder after that it is stuck at line Set filesObj = dirObj.Files .Please
>>> help to fix this error mentioned below. Thanks
>>>
>>> Run-time error '438':
>>> Object does not support this property or method
>>>
>>>
>>> Regards,
>>> ZAFAR IQBAL
>>> ---------------------------------------------------------------
>>>
>>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to