Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default line breaks in a variable

IO currently have the following variable in one continuous line:

sTables = "* Basic Tables. TEMPORARY. NUMERIC T0000000. LEAVE T0000000.
VARIABLE LABEL T0000000 'Table Total'. VALUE LABELS T0000000 0 ' '.
TABLES /FORMAT BLANK MISSING('.') /OBSERVATION " & myVars4ANOVA & "
/TABLES (" & myVars4Table & ") BY (" & Groupvar & "+ T0000000)
(STATISTICS) /STATISTICS mean( ( F7.2 ))."

The program I am passing the variable sTables to needs sTables to look
exactly like:

sTables = "* Basic Tables.
TEMPORARY.
NUMERIC T0000000.
LEAVE T0000000.
VARIABLE LABEL T0000000 'Table Total'.
VALUE LABELS T0000000 0 ' '.
TABLES /FORMAT BLANK MISSING('.') /OBSERVATION " &
myVars4ANOVA & " /TABLES (" & myVars4Table & ") BY (" & Groupvar
& "+ T0000000) (STATISTICS) /STATISTICS mean( ( F7.2 ))."

so that there is a line break after each period mark.
I cannot figure out how to create line breaks within the parentheses?


Lance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default line breaks in a variable

sTable = Application.Substitute(sTable,".", vbNewLine & ".")

you might also try vbCr or vbLf in place of vbNewline (vbNewline is
equivalent to vbCRLF in windows).

Regards,
Tom Ogilvy

wrote in message
...
IO currently have the following variable in one continuous line:

sTables = "* Basic Tables. TEMPORARY. NUMERIC T0000000. LEAVE T0000000.
VARIABLE LABEL T0000000 'Table Total'. VALUE LABELS T0000000 0 ' '.
TABLES /FORMAT BLANK MISSING('.') /OBSERVATION " & myVars4ANOVA & "
/TABLES (" & myVars4Table & ") BY (" & Groupvar & "+ T0000000)
(STATISTICS) /STATISTICS mean( ( F7.2 ))."

The program I am passing the variable sTables to needs sTables to look
exactly like:

sTables = "* Basic Tables.
TEMPORARY.
NUMERIC T0000000.
LEAVE T0000000.
VARIABLE LABEL T0000000 'Table Total'.
VALUE LABELS T0000000 0 ' '.
TABLES /FORMAT BLANK MISSING('.') /OBSERVATION " &
myVars4ANOVA & " /TABLES (" & myVars4Table & ") BY (" & Groupvar
& "+ T0000000) (STATISTICS) /STATISTICS mean( ( F7.2 ))."

so that there is a line break after each period mark.
I cannot figure out how to create line breaks within the parentheses?


Lance



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Line breaks in Excel Fat Doris[_2_] Excel Discussion (Misc queries) 2 September 1st 09 05:01 PM
Line breaks pdgood Excel Discussion (Misc queries) 3 December 5th 06 02:42 AM
unexpected line breaks in .csv mwarner Excel Discussion (Misc queries) 2 July 29th 05 04:20 AM
manual line breaks cwee Excel Discussion (Misc queries) 2 April 21st 05 05:48 PM
Line breaks KatoKat Excel Worksheet Functions 1 March 1st 05 10:04 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"