Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to add parenthesis in a string?

Status
Not open for further replies.

ctlin

Technical User
Apr 17, 2002
77
US
Form6.List2.AddItem ("K/z0 (" & trim$(Str$(j)) & "," trim$(Str$(j+1)) & ") ="

i want the final string to look like:
K/z0 (0,1) =

how do i do this? i'm getting a syntax error on compile at the moment
 
n/m ... got all my text and syntax symbols confused... DOH!
 
You just needed a ampersand after the second TRIM and the closing parenthesis:

Form1.List1.AddItem ("K/z0 (" & Trim$(Str$(j)) & "," & Trim$(Str$(j + 1)) & ") =")
 
You just needed a ampersand after the second TRIM and the closing parenthesis:

Form6.List2.AddItem ("K/z0 (" & Trim$(Str$(j)) & "," & Trim$(Str$(j + 1)) & ") =")
 
Well, you could add two string variables, str_j and str_J_1 to take the place of the integers, j and (j+1).
Then you could could add the lines:
str_j = CStr(j)
str_J_1 = CStr(J+1)

I don't remember if CStr() allows you to have an expression in its parenthesis, you may need to add
an intermediate variable.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top