Hi!
I have a textbox consisting of a lot of text both numbers and chars.
Now in order to make the text dynamic i use replace on the text with certain variables, for example:
If the user needs the date 14 from now. I let him/her write #date14# and the program then searches the textbox for this and replaces it with date + 14 voila! Seemed pretty neat and ahs worked until now... Now we have expanded and a new need arose...
Dynamic date setting... Is it possible to have the program search for #date(whatever number)# store it in a variable. Then do the replace(text, date + the stored variable)?
Here's how i do the static replace
I want it to be like this:
I figured instr would help me and it does... But doing instring the cutting out the number seems like alot of job and a really bad way of solving the problem.. Also there are alot of problems, with ordinary find numbers in string functions cause they will find other numbers aswell.
Cheers!
I have a textbox consisting of a lot of text both numbers and chars.
Now in order to make the text dynamic i use replace on the text with certain variables, for example:
If the user needs the date 14 from now. I let him/her write #date14# and the program then searches the textbox for this and replaces it with date + 14 voila! Seemed pretty neat and ahs worked until now... Now we have expanded and a new need arose...
Dynamic date setting... Is it possible to have the program search for #date(whatever number)# store it in a variable. Then do the replace(text, date + the stored variable)?
Here's how i do the static replace
Code:
nytext = Replace(nytext, "#datum14#", Format(Date + 14, "long Date"))
I want it to be like this:
Code:
nytext = Replace(nytext, "#datum14#", Format(Date + (new-variable-with-dynamic-number), "long Date"))
I figured instr would help me and it does... But doing instring the cutting out the number seems like alot of job and a really bad way of solving the problem.. Also there are alot of problems, with ordinary find numbers in string functions cause they will find other numbers aswell.
Cheers!