Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Little Question


momoelz
 Share

Recommended Posts

You're not exactly clear on what you're asking to do.

12354,58469

You just want to grab the 12354 and completely forget about 58469 to leave yourself with 12354?

If that's what you're asking, this is one way to do it.  I'm assuming 12354,58469 is held in a string variable.  I'll name that variable "moelz".  I'll name the new string that holds 12354 as "newMoelz"

```
Dim num as integer
Dim moelz as string
Dim newMoelz as string

moelz = "12354,58469"

number = InStr(moelz, ",")
newMoelz= Left(newMoelz, num - 1)
```

newMoelz will now be "12354"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...