M
Max Potters
Hi all,
I am able to retrieve data with VB code from a closed workbook, but now I
would also like to PUT data in the closed workbook. I am aware of what
ExecuteExcel4Macro's are, but this wont help me I think. Here is my code:
Sub PutDataInClosedFile()
'
filepath = "C:\Documents and Settings\Max\Desktop\temp"
Filename = "batch.xls"
sheetname = "Sheet1"
'
'''''''''''''''''''''''''
For n = 2 To 16
Strg = "'" & filepath & "\[" & Filename & "]" _
& sheetname & "'!" & "r" & n & "c1"
'
''''''code for putting data in closed workbook has to come here''''''''
<========================
'
Next n
'
End Sub
PROBLEM: How to PUT info from a certain workbook (closed or open) to a
(closed or open) other workbook.
I worked all my books through, but can't find the good syntax, or method to
it. The code you see here has a loop. I want to put a range of cells
("A1:A15") to the closed workbook, but all my methods fail!
Hope you have answers
Thanks in advance
Max
I am able to retrieve data with VB code from a closed workbook, but now I
would also like to PUT data in the closed workbook. I am aware of what
ExecuteExcel4Macro's are, but this wont help me I think. Here is my code:
Sub PutDataInClosedFile()
'
filepath = "C:\Documents and Settings\Max\Desktop\temp"
Filename = "batch.xls"
sheetname = "Sheet1"
'
'''''''''''''''''''''''''
For n = 2 To 16
Strg = "'" & filepath & "\[" & Filename & "]" _
& sheetname & "'!" & "r" & n & "c1"
'
''''''code for putting data in closed workbook has to come here''''''''
<========================
'
Next n
'
End Sub
PROBLEM: How to PUT info from a certain workbook (closed or open) to a
(closed or open) other workbook.
I worked all my books through, but can't find the good syntax, or method to
it. The code you see here has a loop. I want to put a range of cells
("A1:A15") to the closed workbook, but all my methods fail!
Hope you have answers
Thanks in advance
Max