473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to concatenate strings in vba

I am trying to concatenate several sentences stored in textboxes into one textbox. I tried creating a Query and creating the new field to store the data. then use the & to combine the sentences. However, that doesn't seem to work. Any help will be appreciated.
Dec 10 '14 #1
4 1369
twinnyfo
3,653 Expert Mod 2GB
Sherianmartin,

You have not told us what it is about this code that does not work. I know that it will not work if you try to debug it because things are out of order and you have subs and functions intermingled improperly. Also, it is clearly not designed to merely concatenate three sentences into one.

I wouldn't begin to troubleshoot this code, as you have not attempted a solution yourself. Please keep in mind, that this is not intended as a slight. However, on these forums, we expect our posters to have put in the required effort to try to solve their problems first, and then seek advice for specific problems that those of us with greater experience may be able to assist with.

To be honest, the solution to your initial question is incredibly simple. However, the code you posted is incredibly over-complexified, and doesn't address your question.
Dec 10 '14 #2
Thanks for your reply. However, if I knew the answer or how to accomplish this I wouldn't be using your site. Someday I will become an expert like yourself, but I wouldn't mind helping others!
Dec 11 '14 #3
I am trying to concatenate several sentences stored in textboxes into one textbox. I tried creating a Query and creating the new field to store the data. then use the & to combine the sentences. However, that doesn't seem to work. Any help will be appreciated.
Dec 11 '14 #4
twinnyfo
3,653 Expert Mod 2GB
Sherian,

If you browse this site, you will see that I help quite a few people on a daily basis.

However, in your original post, you say you are
trying to concatenate several sentences into one text box.
If you know how to concatenate (that is, if you know enough to know what the word concatenate means), then you essentially have your answer. But, again, you have not even demonstrated an attempt at solving the problem.

However, if you truly have no idea what concatenation is, this should point you in the right direction:

Expand|Select|Wrap|Line Numbers
  1. TextBox = String1 & " and " & String2 & " and " & string3
Let me know if that helps at all.
Dec 11 '14 #5

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

Similar topics

4
by: Jay Chan | last post by:
I am trying to export data from a SQLServer database into a text file using a stored procedure. I want to be able to read it and debug it easily; therefore, I want all the columns to indent nicely....
3
by: Lars Tackmann | last post by:
Hi - I need a function to concatenate a variable number of strings. I have two ideas but cannot deside which way to go. 1) use the "stdarg" macros - if i use these macros it will be easy to step...
13
by: jt | last post by:
I can't seem to find a way to concatenate strings that have nulls within the string. I have a string that I need another string that has nulls in it and what to append the 2nd string, 3 string...
5
by: Diego Martins | last post by:
Since C++ (and STL) have many ways to do string concatenation, I want to hear (read) from you how you do to concatenate strings with other strings and other types. The approaches I know are: --...
9
by: Dave-o | last post by:
New learner. For the print command and concatenation, the period is difficult for my afflicted eyes to see, but the "+" seems to work. Is this an accepted PHP convention? Thank you, David
6
by: mark83anthony | last post by:
How do I concatenate strings from a column into a single row? Whats the logic to create the function in DB2. Given is below. Color ------ red orange
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...

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.