Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question vbs string problem

    ' returns a message box of the date and time
    dim today
    today = msgbox("The time is " & time() "and the date is " & date())


    i have a problem with this string..can someone help me?

    i got the first part right.. the time part works, but when i try and do the second part i get a synatx error, and i'm not sure why

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    you are missing an &

    today = msgbox("The time is " & time() & "and the date is " & date())

    also you might want to add a space before the end so you do not run into the two strings merging. " The time is 00:00and the date....."
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks A1ien51 that was a big help

  • #4
    New Coder
    Join Date
    Feb 2004
    Location
    Virginia
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thats not the code for a message box even


    msgbox "prompt" 'Basic Msgbox code
    Umm...dude?
    Hell just broke loose...


  •  

    Posting Permissions

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