473,480 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Space character?

219 New Member
Anyone know what the space character is represented as in VBA?

I'm trying to run a replace function to replace all space characters with underscores.

Expand|Select|Wrap|Line Numbers
  1. Dim newCaption As String
  2. newCaption = Replace(caption, " ", "_")
  3.  
Nov 2 '07 #1
2 6272
Jim Doherty
897 Recognized Expert Contributor
Anyone know what the space character is represented as in VBA?

I'm trying to run a replace function to replace all space characters with underscores.

Expand|Select|Wrap|Line Numbers
  1. Dim newCaption As String
  2. newCaption = Replace(caption, " ", "_")
  3.  

that will work as is....provided the variable caption has something assigned to it as a string value already.

I am guessing here but....Is the word caption the property of a screen control ie a label or the forms caption because if that is the case the word caption should be referenced properly! (ie: Me!Label.caption or Me.caption in the case of a form itself) so that we can understand it much better as being that.... rather than being an apparent 'variable' by your posting. If it is a variable then you should really steer clear of defining variables that have same names as properties in favour of naming it something less similar to avoid confusion.

Regards

Jim :)
Nov 2 '07 #2
dmorand
219 New Member
Thanks Jim, I got it working!
Nov 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

12
14671
by: lawrence | last post by:
I'm bad at regular expressions. Is this how I would look for any set of characters that go more than 60 characters without a white space? ..{60} Also, does this match a block of PHP in an...
2
37118
by: barb28 | last post by:
Hello, sometimes I have noticed that in web addresses, the number: 20% will show up in the address. I think this is somehow related to a 'blank space', but am unsure, does anyone know about...
28
9021
by: Andreas Prilop | last post by:
Jukka reports on http://www.cs.tut.fi/~jkorpela/chars/spaces.html that Internet Explorer 6 fails on the "zero width space" U+200B ​ Is this observation still valid? For which versions of MS...
3
4578
by: sudhaoncyberworld | last post by:
Hi var lbl=document.createElement('LABEL'); var txt=document.createTextNode('text'); lbl.appendChild(txt); in above txt node i want a space infront of that i tried below, but no use
13
7164
by: Bryan Parkoff | last post by:
I have seen that C/C++ Compiler supports long filename up to 254 characters plus the extension. Can header files and source code files accept space between alphabet character and numeric...
2
3773
by: Kannan | last post by:
In section 7.19.6.1 on ISO C specification, it says about a format character "space". When and how we will use this "space" format? I mean is there a usage, for e.g. like printf("%space",...); ? ...
3
2834
by: kvnsmnsn | last post by:
I've written the following Javascript file that includes an input text field and an output text field, the latter of which is initialized to zero. Each time the user enters a number in the input...
1
2517
by: seahorse298 | last post by:
I am using MS Access 2000 on a Windows XP machine. I have a list form, listing the number of companies a business is dealing with. I have a filter field on the form which is used to filter the...
5
15634
by: vlsidesign | last post by:
The printf function returns "warning: unknown escape sequence: \040" for a backslash-space combination. If the ascii decimal number for space is 32 and the backslash is 92, why this particular...
1
1382
by: Gaurav | last post by:
I am loading an XML file and applying the XSLT using .net 2003 (C#). XSLT will add Space character in the xml. I am using the entity value for space character . it works fine in .net 1.1...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7034
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7076
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6732
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4472
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.