I have the following type of data sitting in a varaible
Just Buttons+butto
The text and lenght can change, however, no matter what the length is I would like to strip off the "+" sign and everything to the right of it and place it into another (or the same) variable. What is the easiest way to accomplish this
Thank you
John 3 1063
"jcrouse" <an*******@disc ussions.microso ft.com> schrieb I have the following type of data sitting in a varaible:
Just Buttons+button
The text and lenght can change, however, no matter what the length is I would like to strip off the "+" sign and everything to the right of it and place it into another (or the same) variable. What is the easiest way to accomplish this?
Dim s As String
s = "Just Buttons+button"
s = s.Split("+"c)(0 )
--
Armin
How to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
John,
In addition to Armin's suggestion:
Dim s As String
s = "Just Buttons+button"
s = s.SubString(0, s.IndexOf("+"c)
I suspect there are probably 2 or 3 other methods you could use ;-)
Hope this helps
Jay
"jcrouse" <an*******@disc ussions.microso ft.com> wrote in message
news:70******** *************** ***********@mic rosoft.com... I have the following type of data sitting in a varaible:
Just Buttons+button
The text and lenght can change, however, no matter what the length is I
would like to strip off the "+" sign and everything to the right of it and
place it into another (or the same) variable. What is the easiest way to
accomplish this? Thank you, John
HI Jay, I suspect there are probably 2 or 3 other methods you could use ;-)
It was for me a challenge and I can give of course a VB left function,
however the one you gave is the best in my opinion and therefore I will not
bring the OP in problems by giving him another one.
:-)
No need answering.
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Noah |
last post by:
I have a text field in a form. I want the user to be able to click
a DELETE button and have the character at the cursor position deleted.
This would be just as if the user had pressed the Back Space key on the
keyboard... But this is for a kiosk application with no keyboard :-(
so I need to program a delete button.
I have code that lets me...
|
by: Safalra |
last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4
if that makes a difference) that loads an HTML file, removes invalid
characters (or replaces them in the case of common ones like
Microsoft's 'smartquotes'), and outputs the file.
The problem is these files will be on disk, so the program won't have
the character encoding...
|
by: jen_designs |
last post by:
Is there a way to return the character position on a page? Not the x
and y coordinates, but the number of characters on a page. For
instance i have a html page with the following text: This is my string.
Then character postion for m would be 9. Any thoughts?
|
by: chandy |
last post by:
Hi,
I have an Html document that declares that it uses the utf-8 character
set. As this document is editable via a web interface I need to make
sure than high-ascii characters that may be accidentally entered are
properly represented when the document is served. My programming
language allows me to get the ascii value for any individual...
|
by: Steve |
last post by:
I have a continuous form with several unbound comboboxes in the form header. The
comboboxes are used to provide criteria for the SQL of the form. The code behind
the form looks like:
Public Sub FormSQL()
Dim SQLStr As String
SQLStr = < Code to build SQL String based on selection in comboboxes>
SQLStr = SQLStr & ";"
Me.RecordSource =...
| |
by: Lau Lei Cheong |
last post by:
Hello,
I'm writing a project that involves entering chinese character into
MySQL database.
Since 1) connection-based coding selection requires an upgrade to
version 4.1.1 or above and my company don't want to do that, 2) the web
program will run in both big5 and gb2312 so I can't simply set the coding to
big5, and 3) my company's backend...
|
by: STeve |
last post by:
Hey guys,
I currently have a 100 page word document filled with various
"articles". These articles are delimited by the Style of the text
(IE. Heading 1 for the various titles) These articles will then be
converted into HTML and saved. I want to write a parser through
vb.net that uses the word object model and was wondering how this...
|
by: tatata9999 |
last post by:
Hi,
SQL env: sql server 2000
Target column of insertion: varchar(15)
Case, a var is made up of a character of the following characters
(random selection):
A,B,C,D,E,$,!,%,^,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,&,*,(,)
and a few numbers (random selection), and then
|
by: robtyketto |
last post by:
Greetings,
I'm slowly building up code to do the following:-
Display TWO selection option boxes (cascading).
If the FIRST selection option box changes then reload the jsp using onchange event (not changing the option box value on relaod i.e. not re-running the SQL query).
ONLY on initial entry should the form FIRST selection option box...
|
by: =?Utf-8?B?TGkgUWl1?= |
last post by:
Hi,
I am trying to get the inserting position of a string within a
DataGridViewTextBoxCell in editing mode, based on the cursor point position
in selection mode.
I used the method GetCharIndexFromPosition() in class
DataGridViewTextBoxEditingControl.
It was found that the DataGridViewTextBoxEditingControl.X has 3 pixel more
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |