Hello Origami and welcome !
If you are doing hoardes of quotes in strings, and want some tidy readable code ...
Quote:
' function to change apostrophe to quote
sub a2q(mystr)
a2q = strreplace (mystr," ' ", chr(34)) ' spaces for clarity of apostrophe
end sub
...
x = a2q("Hello 'World', this is your 'infamous' captain 'Jack Sparrow' speaking!")
y = a2q("Arrgh! So 'you' be that 'scurvy knave' they call 'captain jack?' ")
z = a2q("'Aye!' I be that 'scurvy knave' ... ")
|
Of course if you are using apostrophes as well, then simply use the reverse apostrophe ... ` ... normally found at the top left of your keyboard, like this...
Quote:
' function to change rvs apostrophe to quote
sub a2q(mystr)
a2q = strreplace (mystr,"`", chr(34))
end sub
...
x = a2q("Hello `World`, this is your `infamous` captain `Jack Sparrow` speaking!")
y = a2q("Arrgh! So `you` be that `scurvy knave` they call `captain jack?` ")
z = a2q("`Aye!` I be that `scurvy knave` ... ")
|