PDA

Click to See Complete Forum and Search --> : How to declare a global object??


laudy
Dec 1st, 1999, 10:36 PM
I am trying to create an object ONCE to write a logfile and want various Functions to be able to use the same object, How can I do this?

Right now I am using the following within an click event and it works fine, but I want to be able to just use my Logfile.Writeline command within any function to append to the same file...

Set Logfile = fso.CreateTextFile("c:\installlog.txt", True)
Logfile.WriteLine " Install Log Created" & " " & (Now)


Thanks.

laudy
Dec 2nd, 1999, 02:28 AM
Thank you.

MartinLiss
Dec 2nd, 1999, 11:18 AM
Place the following in the Declarations section of a module

Public Logfile as Object

------------------
Marty