LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default PUT data in closed workbook

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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace data into closed workbook b&s[_3_] Excel Discussion (Misc queries) 2 November 16th 08 09:19 AM
Get Data From Closed Workbook Minitman Excel Worksheet Functions 20 March 18th 08 09:50 PM
getting data from closed workbook onedaywhen Excel Programming 0 April 2nd 04 09:10 AM
getting data from closed workbook onedaywhen Excel Programming 0 April 2nd 04 09:08 AM
getting data from closed workbook John Williams[_4_] Excel Programming 0 April 1st 04 09:08 PM


All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"