Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1612
  • 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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

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