Hi,
I still hope to get some help with this....
I am getting lost..
I have found some macro coding that could help me out a bit.
Option Explicit
'credit for this technique goes to John Walkenback
'http://j-walk.com/ss/excel/tips/tip82.htm
Sub GetDataDemo()
Dim FilePath$, Row&, Column&, Address$
'change constants & FilePath below to suit
'***************************************
Const FileName$ = "Name 1.xls"
Const SheetName$ = "Week 21"
Const NumRows& = 30
Const NumColumns& = 17
FilePath = ActiveWorkbook.Path & "\CC\"
'***************************************
DoEvents
Application.ScreenUpdating = False
If Dir(FilePath & FileName) = Empty Then
MsgBox "The file " & FileName & " was not found", , "File Doesn't Exist"
Exit Sub
End If
For Row = 9 To NumRows
For Column = 5 To NumColumns
Address = Cells(Row, Column).Address
Cells(Row, Column) = GetData(FilePath, FileName, SheetName, Address)
Next Column
Next Row
ActiveWindow.DisplayZeros = False
End Sub
Private Function GetData(Path, File, Sheet, Address)
Dim Data$
Data = "'" & Path & "[" & File & "]" & Sheet & "'!" & _
Range(Address).Range("A1").Address(, , xlR1C1)
GetData = ExecuteExcel4Macro(Data)
End Function
In the next part:
Const SheetName$ = "Week 21"
I would like to refer to a cell on the main sheet where I would fill in the data manually
I might could do the same for:
Const FileName$ = "Name 1.xls"
But then would like to refer to a list of names or something.
Please help me out. I am just a beginner in Macro's.
Bookmarks