473,386 Members | 1,766 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.

vb truncate text

How to truncate text in VB? Need to unclutter the map.
ArcGIS mapping environment.
Only want 1st 5 characters of parcel field "Street".
Jun 4 '15 #1
1 1585
Expand|Select|Wrap|Line Numbers
  1. 'I don't know if you are asking something like this... but...
  2. 'In a form put a commandbutton, paste the code and click it
  3. '..............................
  4. Private sub command1_click()
  5. dim TheStart as integer: TheStart=2
  6. dim TheLength as integer: TheLength=3
  7. dim MyString as string: MyString="A long text"
  8. msgbox mid$(MyString,TheStart,TheEnd)
  9. msgbox left$(MyString,TheLength)
  10. msgbox right$(MyString,TheLength)
  11. end sub
Sep 17 '15 #2

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

Similar topics

4
by: Amit Kulkarni | last post by:
Hi, I have small problem. I want to truncate a line in a text file using C file handling functions and write new line in place of it. How do I do it? e.g. "example.txt" Line 1: This is a...
0
by: IBMDA400 Providers | last post by:
I need truncate text for display in a template column of datagrid, but i need to do automatic. How can to do this operation? Thanks
8
by: gene.ellis | last post by:
Hello. I using a simply SELECT statement to retrieve some data from a SQL SERVER via an ODBC connection. I had to go from VARCHAR to TEXT because the amount of data. Anyway, my SQL statements...
8
by: Wayne | last post by:
My supervisor performs the following steps to generate an email notifying recipients of new problem reports: 1) Generate an Access report containing the columnar data and export it to a .rtf...
5
by: Dinsdale | last post by:
I have an application that recieves text data via external input (i.e. serial) and displays it on the screen (we use carraige return as a delimiter). At this point I use a regular old text box and...
6
by: aenriquez | last post by:
Lets say I have a column with the following text in 5 rows: 1015758349 10147594734 10173 101288 1019384048 I'd like to run a MSSQL command (if possible) to take out the '101' from every...
5
by: Timothy Madden | last post by:
Hello I see there is now why to truncate a file (in C or C++) and that I have to use platform-specific functions for truncating files. Anyone knows why ? I mean C/C++ evolved over many years...
1
by: londres9b | last post by:
Hi, I have this nice function to truncate a string with HTML. It's very good only now I ran into a problem. There are cases where for example The input will be this: <a href="some url">this is a...
0
by: elderfrog | last post by:
In GIS map, I want just the first 5 characters of the "street_name" field to be printed in the map. It's an effort to unclutter the text on the map. What's the vbscript to do this?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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.