Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TAB?

Posted on 2002-05-15
8
Medium Priority
?
215 Views
Last Modified: 2011-10-03
Hi,

How to insert a tab key between two strings?

e.g

StrA & "   " & StrB


Thanks!
0
Comment
Question by:cplau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 7010845
StrA & vbTab & StrB
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 7011141
or

msgbox StrA & chr(9) & StrB
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7011481
Or even....

strNewString = StrA & "x" & StrB
Mid$(strNewString,Len(StrA)+1,1) = vbTab

or

StrA & "¡" & StrB

where ¡ is the key combination Alt-NumericKeyPad_9


(emoreau get the points for most efficient solution!)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 15

Expert Comment

by:ameba
ID: 7011582
or:
    Dim strA As String, strB As String
    strA = "hello,"
    strB = "world"
    MsgBox Join(Array(strA, strB), vbTab)
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 7011592
since we all have an equally valid answer we should each get 50 points  :-)
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7011626
Hey...I offered two answers...I want 100 points ;)

And what about:

strCombined = StrA & "~" & StrB
strCombined = replace("~", vbTab) ' assuming StrA does not contain "~"

or

(variation on my first)

strCombined = StrA & "~" & StrB
intDelimPosit = instr(strCombined, "~")
Mid$(strNewString,intDelimPosit,1) = vbTab

--
My choices are more geared toward replacing a delimiter AFTER the strings are already appended.  (i.e. "insert a tab [character] between two " previously combined strings.)

--
Aso note that if this string is going to be sent as keystrokes to an application, you amy want to replace the "tab key" with a string of spaces instead: String$(8, " ") or space$(8)
0
 
LVL 15

Expert Comment

by:ameba
ID: 7011646
>insert a tab [character]
The question was insert 'tab key'.  Maybe this should be posted in hardware section.  ;-)
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7014159
I was hoping for a comment  :(

hmmm I'll add my own:

"insert a tab key between two strings"

Go to the keyboard and pry off the button next to the "Q" key marked "Tab".  Go to the store and but some twine.  Cut off a piece of twine, then cut it in half.  Place the "Tab" button between the pieces of twine.  Mission accomplished...  LOL...  (Thanks for the idea ameba!)
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question