+ Reply to Thread
Results 1 to 1 of 1

part of string in Select case

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Italy
    MS-Off Ver
    11
    Posts
    134

    part of string in Select case

    i want to intercept the first left character in the Case Select... how to
    piece of code:

    Select Case TIP_SOSP

    Case "150008040030"
    FOGLIO = "1500_0804_0030"
    ULTIMA = Sheets(FOGLIO).Cells(65536, 1).End(xlUp).Row + 1
    GoTo IMPORTA
    Case "250008050030"
    FOGLIO = "2500_0805_0030"
    ULTIMA = Sheets(FOGLIO).Cells(65536, 1).End(xlUp).Row + 1
    GoTo IMPORTA
    *****************
    Case Left(1, 4) = "1500"
    FOGLIO = "1500"
    ULTIMA = Sheets(FOGLIO).Cells(65536, 1).End(xlUp).Row + 1
    GoTo IMPORTA
    ****************
    'Case "2500"
    ' FOGLIO = "2500"
    ' ULTIMA = Sheets(FOGLIO).Cells(65536, 1).End(xlUp).Row + 1
    ' GoTo IMPORTA
    'Case "3500"
    ' FOGLIO = "3500"
    ' ULTIMA = Sheets(FOGLIO).Cells(65536, 1).End(xlUp).Row + 1
    ' GoTo IMPORTA
    Case Else
    FOGLIO = "L0953"
    ULTIMA = Sheets(FOGLIO).Cells(65536, 1).End(xlUp).Row + 1
    GoTo IMPORTA

    End Select

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    as per attached code

    Please Login or Register  to view this content.

+ 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