Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 11th, 2007, 06:55 AM
Authorized User
 
Join Date: May 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default mid

hi all
what is the use of mid$ ?

 
Old June 11th, 2007, 02:49 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

It allows you to grab a portion of a string. (This is the same case with Left$() and Right$().)

Given
Code:
    s = "ABCDEFG"

    Debug.Print Mid$(s, 1, 3) ' prints "ABC"
    Debug.Print Mid$(s, 3, 3) ' prints "CDE"
    Debug.Print Mid$(s, 3)    ' prints "CDEFG"





Similar Threads
Thread Thread Starter Forum Replies Last Post
CharIndex to split last, first and Mid name khautinh SQL Server 2000 4 June 28th, 2006 08:27 AM
Using MID in SQL server rtr1900 Classic ASP Databases 0 December 13th, 2005 12:21 PM
VB fx mid -> PHP ? Mantis Pro PHP 1 March 3rd, 2005 10:08 AM
mid-function not working (i did something wrong) Haroldd Classic ASP Basics 3 February 11th, 2004 04:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.