View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default WriteLine function

Try these changes. for a double quote to show in the out put you need to put
two in a row. Also I'm assuming that you have the variables layers_counter
and an array layers(X,2). The variables need to be seperate from the rest of
the string like I did below. I also added a message box so you can see the
results. if you can't read the entire string then put the string on a
worksheet like this

Range("A1") = WriteData

Here are the changes

WriteData = "$insert_physical_layer(<" & layers_counter & "," & _
"""<" & layers(layers_counter, 1) & """," & _
"""<" & layers(layers_counter, 2) & ", "");"
MsgBox (WriteData)
objStackupFile.WriteLine (WriteData)

"Varun" wrote:

Guys,

I am using WriteLine function to write lines to a text file. Here's the
format of the line:

$insert_physical_layer(<layer_order, €œ<physical_layer_name€,
€œ<logical_layer_name€, €œ€);

Above, both physical_layer_name and logical_layer_name will be substituted
with values from arrays i.e. everything else is a constant.

Here's what I have so far for the WriteLine code:

objStackupFile.WriteLine("$insert_physical_layer(< layers_counter,"<layers(layers_counter, 1)","<layers(layers_counter, 2)", "");")

Above line does not work...has to do with wanted or unwanted double quotes
and/or more objects. Can you please tell me what the writeline should look
like?

Thanks for help.