My code isn't finding "Dim"

Author Message
al3x41044

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 7/4/2010
  • Status: offline
My code isn't finding "Dim" Sunday, July 04, 2010 8:17 AM (permalink)
0
I have some code that requires putting data into a "Dim".
My code is this:
 
Dim mg
mg = Split(Application.Contents("news"),"•")
For Each rt In mg
[color=#4b0082 font="courier new"]  Response.Write(rt & "<br />")
[color=#0000ff font="courier new"]Next
 
but when you view the page, an error message appears saying: "Object Expected: 'mg'"
 
I'm sure it's embarassingly simple, but i can't figure out why it can't find "mg"... can anyone help?
<message edited by al3x41044 on Sunday, July 04, 2010 8:48 AM>
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    Re:My code isn't finding "Dim" Tuesday, July 06, 2010 1:46 AM (permalink)
    0
    Dim simply declares the variable to the interpreter. The problem is this statement:

    mg = Split(Application.Contents("news"),"•")

    I have no idea exactly what you are trying to split (we would need more code to tell) but whatever it is isn't working.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9