Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1552
  • Last Modified:

Easy, whats VB Constant for Space?

Easy, whats the VBConstant or equivlent of a space?
Like vbCrLf is for Carriage return–linefeed combination.

Whats the one for a 's p a c e'?
0
fredmastro
Asked:
fredmastro
  • 5
  • 4
1 Solution
 
rupertsCommented:
char(32)

Have nice day!

0
 
rupertsCommented:
ok...

chr(32)

I got carried away in the excitement!
0
 
fredmastroAuthor Commented:
ack I knew that, whats the vb string for that? So I can use the Replace command.

Replace(Text32,????," ")

I tried (Text32,char(32)," ") doesn't like it.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
fredmastroAuthor Commented:
lol
0
 
fredmastroAuthor Commented:
Not sure if it's related but I get a :

Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'Replace'


error now.
That my code.

Text=Replace(News("News"),vbCrLf,"<BR>")

Text=Replace(News("News"),chr(32),"&nbsp;")
0
 
rupertsCommented:
ok...

chr(32)

I got carried away in the excitement!
0
 
fredmastroAuthor Commented:
maybe there's a trick to using two replace statments? Works fine one of them, I get error with two.
0
 
fredmastroAuthor Commented:
Ahh got it thanks

Text=Replace(News("News"),vbCrLf,"<BR>")
      
Text=Replace(Text,chr(32),"&nbsp;")
0
 
rupertsCommented:
ok - a result at last..

(although have you checked that you can pass a NULL value to the replace function?)
.......................................
And finally you can use the asc(character) function to find out any character value but you probally knew that anyway!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now