ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Put Value in Close Excel (https://www.excelbanter.com/excel-programming/428665-put-value-close-excel.html)

[email protected]

Put Value in Close Excel
 
Hi,

I've found this wonderful code from John's website. Which retrieve a
value from a closed workbook.

http://j-walk.com/ss/excel/eee/eee009.txt

However, I need a code to do the opposite. Eg: To Put or Write a value
to a closed workbook.

Is there a way?

Thanks.

JL

Patrick Molloy

Put Value in Close Excel
 
you can't do that
your code would need to open the workbook then save/close it

dim wb as workbook
dim sWBname as string
sWBname = "{full path and name}"
set wb=WorkbooksOpen(sWBname )
' do something to it
wb.worksheets("Sheet1").Range("A1")=Date
wb.Close True ' true saves, false doesn't save
set wb = Nothing ' cleanup



wrote in message
...
Hi,

I've found this wonderful code from John's website. Which retrieve a
value from a closed workbook.

http://j-walk.com/ss/excel/eee/eee009.txt

However, I need a code to do the opposite. Eg: To Put or Write a value
to a closed workbook.

Is there a way?

Thanks.

JL



[email protected]

Put Value in Close Excel
 
Hi,

Opening and Closing Workbook takes a long time.
I need to update 3000 closed workbooks.. :(

Can't ExecuteExcel4Macro function be use to input data to closed
Workbook ?

Thanks.
JL


All times are GMT +1. The time now is 03:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com