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. Text Format

Text Format

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 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.
  • R Offline
    R Offline
    ryanchk
    wrote on last edited by
    #1

    I'm using a VB6 application with an FP Spread control. I need a way to check to see if the date was entered complete and in the right format. This is the idea that I have but does not work: With fpsScr If .ActiveCol = 6 And .ChangeMade Then If .Text <> "##/##/####" Then MsgBox "The date was not entered correctly. Please try again.",_ vbOKOnly, "Incorrect Date Entry" End If End If End With Can someone help me? ryanchk

    T 1 Reply Last reply
    0
    • R ryanchk

      I'm using a VB6 application with an FP Spread control. I need a way to check to see if the date was entered complete and in the right format. This is the idea that I have but does not work: With fpsScr If .ActiveCol = 6 And .ChangeMade Then If .Text <> "##/##/####" Then MsgBox "The date was not entered correctly. Please try again.",_ vbOKOnly, "Incorrect Date Entry" End If End If End With Can someone help me? ryanchk

      T Offline
      T Offline
      thealca
      wrote on last edited by
      #2

      If .Text <> "##/##/####" Then Replace this with: if IsDate(.Text) then

      R 1 Reply Last reply
      0
      • T thealca

        If .Text <> "##/##/####" Then Replace this with: if IsDate(.Text) then

        R Offline
        R Offline
        ryanchk
        wrote on last edited by
        #3

        thealca, I appreciate you taking the time te help me. The solution checks to see if the field is a date but I also need to make sure that the date wasn't entered incorrectly, i.e. if someone just enters 5/05 I want to display the message to have them re-enter the date. ryanchk

        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