A
Anders
Hi All,
In xl2003 - Using RDB Merge all Workbooks (found here
http://msdn.microsoft.com/en-us/library/cc837974.aspx )
I have 13 folders on a shared drive for individual user groups to update
bi-weekly. Each folder contains one main update sheet which I will pull
together for one report (also contain subfolders that are saved copies by
date of previous updates, but that’s another post ïŠ )
1. I have to leave blank rows in the source sheets for users to have room to
input but they don’t have to fill. The pasted cells in the destination sheet
are stopping at 26 (where the first blank row is) I need to get to row 94
(past 3 more sets of empties). The sourcerange will always be “a1:j94â€, for
every sheet. I have adjusted the sourcerange in VBA to this value – but
still running into the problem.
2. I’ll have to modify the source code for where to find the files. I don’t
want to find all files in destination folder, rather, I would like it to just
pick up 1 specific file in each folder – 13 in all. (I’m creating subfolders
in each folder that I don’t want to collate each time.) I have seen RDB
merge data (below) but don’t know how I would combine the two.
3. Can I transfer formatting (row/column, height/width) so I don’t have to
readjust everytime?
4. Can I transfer VBA sheet code (Calendar Control 11.0)
Thanks so much in advance.
Sub RDB_Merge_Data()
Dim myFiles As Variant
Dim myCountOfFiles As Long
myCountOfFiles = Get_File_Names = "Macro.xls"
MyPath = "h:\Macro"
Subfolders = False
ExtStr = "*.xl*"
myReturnedFiles = myFiles
If myCountOfFiles = 0 Then
MsgBox "No files that match the ExtStr in this folder"
Exit Sub
End If
Get_Data:
FileNameInA = True
PasteAsValues = True
SourceShName = ""
SourceShIndex = 1
SourceRng = "A1:G1"
StartCell = ""
myReturnedFiles = myFiles
End Sub
In xl2003 - Using RDB Merge all Workbooks (found here
http://msdn.microsoft.com/en-us/library/cc837974.aspx )
I have 13 folders on a shared drive for individual user groups to update
bi-weekly. Each folder contains one main update sheet which I will pull
together for one report (also contain subfolders that are saved copies by
date of previous updates, but that’s another post ïŠ )
1. I have to leave blank rows in the source sheets for users to have room to
input but they don’t have to fill. The pasted cells in the destination sheet
are stopping at 26 (where the first blank row is) I need to get to row 94
(past 3 more sets of empties). The sourcerange will always be “a1:j94â€, for
every sheet. I have adjusted the sourcerange in VBA to this value – but
still running into the problem.
2. I’ll have to modify the source code for where to find the files. I don’t
want to find all files in destination folder, rather, I would like it to just
pick up 1 specific file in each folder – 13 in all. (I’m creating subfolders
in each folder that I don’t want to collate each time.) I have seen RDB
merge data (below) but don’t know how I would combine the two.
3. Can I transfer formatting (row/column, height/width) so I don’t have to
readjust everytime?
4. Can I transfer VBA sheet code (Calendar Control 11.0)
Thanks so much in advance.
Sub RDB_Merge_Data()
Dim myFiles As Variant
Dim myCountOfFiles As Long
myCountOfFiles = Get_File_Names = "Macro.xls"
MyPath = "h:\Macro"
Subfolders = False
ExtStr = "*.xl*"
myReturnedFiles = myFiles
If myCountOfFiles = 0 Then
MsgBox "No files that match the ExtStr in this folder"
Exit Sub
End If
Get_Data:
FileNameInA = True
PasteAsValues = True
SourceShName = ""
SourceShIndex = 1
SourceRng = "A1:G1"
StartCell = ""
myReturnedFiles = myFiles
End Sub