View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
elcroco elcroco is offline
external usenet poster
 
Posts: 7
Default Open - Output txt file creation

the variable is declared before, I ve just forgotten to write it in the
post !!!

wrote:
There is nothing wrong with what you have written, but you have
magically created a variable called StrName in your code snippet and
(a) not declared it and (b) not set it - so there MAY be something in
the rest of your code that is actually the fault
elcroco wrote:

Hi everybody,

I would like to know whether I need to add a specific reference in my
vba project in order to be able to use the following kind of command:

dim lfnum as long

lfNum =FreeFile

Open strName &".txt" For Output as lFNum

Because by default whenI do that it is not recognized and the
compilation cannot be done

thans in advance for your answer

G