Writing to a closed workbook

A

agarwaldvk

Hi All

Is there any way that I can write to a closed workbook? It can b
presumed that a check has already been made to ensure that this fil
does exist before attempting to write to it - but I need to be able t
write to this workbook without having to open it.

Any suggestions? Thanks in advance.

Best regards



Deepak Agarwa
 
N

Norman Jones

Hi Deepak,

The usual appoach is to turn srcreen updating off | open the file , write
the data | close the file | turn screen updating on. This effectively hides
the operation.
 
M

Myrna Larson

I believe this would be possible using ADO to treat the workbook like a
database.

But you can turn off screen updating, open a workbook, write your values, and
close it, without the user (probably) noticing what has happened.
 
A

agarwaldvk

Myrna

How would I be able to treat the workbook as a database using ADO? I
that something that is possible to do from within Excel?

Otherwise, I don't mind doing as both of you have suggested but jus
out of interest would like to know, anyway!


Best regards



Deepak Agarwa
 
M

Myrna Larson

I don't have any sample code at the tips of my fingers, but I've seen it in
several books on Access programming. It looks to me as though the data in
Excel must be laid out as a "list", i.e. you can't just write willy-nilly to
any cells on any worksheet.
 
Top