+ Reply to Thread
Results 1 to 3 of 3

vba split function

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    2

    vba split function

    I came across the following VBA split code:
    lngLastRow = Split(wbactive.worksheets(CStr(xl_SheetName).Range(DataRange).Address,"$")(4)

    I understand this is to determine the last row number, however what is the ending "(4)" supposed to do? Thank you for your inputs in advance!

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: vba split function

    it returns the fifth element of the array that split produces (the array index is zero based)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    04-15-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: vba split function

    Thank you, JesephP.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1