ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   External Variable Declaration (https://www.excelbanter.com/excel-programming/315186-external-variable-declaration.html)

ehntd[_2_]

External Variable Declaration
 

I had seen that, but the problem is that I do not want to insert
module or a procedure, I just want to insert three lines of code (o
execute them externally... it at all possible). The problem is that
donīt know how to replace the lines that already exist in the progra
with the lines that exist in the txt file.

What I really want is something like the C insert command...

--
ehnt
-----------------------------------------------------------------------
ehntd's Profile: http://www.excelforum.com/member.php...fo&userid=1586
View this thread: http://www.excelforum.com/showthread.php?threadid=27355


keepITcool

External Variable Declaration
 
do you mean s'thing like:

Option Explicit

Public globals(4) As Integer

Sub ReadGlobs()
'Fills the array globals with
'the data contained in a txt file.

Dim i%

Open "c:\globals.dat" For Input As #1
While Not EOF(1) And i <= UBound(globals)
Input #1, globals(i)
i = i + 1
Wend
Close #1

End Sub





keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


ehntd wrote:

http://www.excelforum.com/showthread...hreadid=273553




All times are GMT +1. The time now is 01:26 PM.

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