Thread
:
PUT data in closed workbook
View Single Post
#
5
Posted to microsoft.public.excel.programming
Ron de Bruin
external usenet poster
Posts: 11,123
PUT data in closed workbook
Hi Max
Anyway, for others who have (possible) solutions, please post me,
Tom give you a link to Ole's site
http://www.erlandsendata.no/english/...nvbadacwbdbado
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Max Potters" wrote in message ...
Thanks for your replies.
Though I really think this is possible. It's possible to read data from a
closed workbook file and copy this into another workbook, so why wouldn't it
be possible to PUT data in a closed workbook?
Anyway, for others who have (possible) solutions, please post me, or send to
my email:
thanks
max
"Tom Ogilvy" wrote in message
...
I agree with Frank that opening the workbook makes the most sense.
However, if your data is organized as database, you can treat it as a
database and update it use SQL and ADO or DAO. I personally haven't done
this, but if you want to explo
http://www.erlandsendata.no/english/...php?t=envbadac
Mr. Erlandsen's site.
--
Regards,
Tom Ogilvy
"Max Potters" wrote in message
...
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
Reply With Quote
Ron de Bruin
View Public Profile
Find all posts by Ron de Bruin