Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. problem with Left$-Function in VB6

problem with Left$-Function in VB6

Scheduled Pinned Locked Moved Visual Basic
helpregexquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Artur Lowen
    wrote on last edited by
    #1

    hi, I did VB6 a very long time ago...nearly forgot about it, but now I have to do a project in vb. My problem is I get the following error when using the Left$-Function: Type-declaration character doesn't match declared data type. Here is my code: Public Sub Main() Dim s As String s = Left$("test", 2) End Sub What can it be ? As far as I remember it should work like this. It is also explained in the MSDN like this. Thanks for help Azrah

    E 1 Reply Last reply
    0
    • A Artur Lowen

      hi, I did VB6 a very long time ago...nearly forgot about it, but now I have to do a project in vb. My problem is I get the following error when using the Left$-Function: Type-declaration character doesn't match declared data type. Here is my code: Public Sub Main() Dim s As String s = Left$("test", 2) End Sub What can it be ? As far as I remember it should work like this. It is also explained in the MSDN like this. Thanks for help Azrah

      E Offline
      E Offline
      Edbert P
      wrote on last edited by
      #2

      Try Left("Test",2) instead. I think Left$ is used in older version of VB, or maybe for something else..I forgot ;P Edbert P. Sydney, Australia.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups