ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Initialize an excel datasheet (https://www.excelbanter.com/excel-programming/394549-initialize-excel-datasheet.html)

[email protected]

Initialize an excel datasheet
 
Hi,

I need to read a file when a datasheet is opened, and store the value
read within a global variable (in Sheet1). How do I do this?

Thanks,

Aine.


[email protected]

Initialize an excel datasheet
 
On 1 Aug, 13:27, wrote:
Hi,

I need to read a file when a datasheet is opened, and store the value
read within a global variable (in Sheet1). How do I do this?

Thanks,

Aine.


It depends on what you mean by read a file - did you want to open it
for input, is it an excel sheet? Something like

open "c:\test.txt" for input as #1

input 1, a
close
range("C1").value=a


[email protected][_2_]

Initialize an excel datasheet
 
Either save it in the Templates directory or in the StartUp directory.



All times are GMT +1. The time now is 11:14 PM.

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