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. How can i execute code at run time ?

How can i execute code at run time ?

Scheduled Pinned Locked Moved Visual Basic
question
3 Posts 3 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.
  • N Offline
    N Offline
    nimolZero
    wrote on last edited by
    #1

    hey there ! pls save me now. i want to run this code below at run time : (after we load form already) 1. i have one text box that contain code below dim Str$ for i as integer=0 to 5 for j as integer=0 to 5 for k as integer=0 to 4 str=i+j+k listbox1.items.add str next next next 2. one listbox for get the result 3. one command button for click to execute code in the textbox i wait for all of ur reply 2me na . thanks in advance regard from spider anatha

    P D 2 Replies Last reply
    0
    • N nimolZero

      hey there ! pls save me now. i want to run this code below at run time : (after we load form already) 1. i have one text box that contain code below dim Str$ for i as integer=0 to 5 for j as integer=0 to 5 for k as integer=0 to 4 str=i+j+k listbox1.items.add str next next next 2. one listbox for get the result 3. one command button for click to execute code in the textbox i wait for all of ur reply 2me na . thanks in advance regard from spider anatha

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      I don't think you can execute code dynamically in classic VB. You can do it in VB.NET though.

      Paul Marfleet

      1 Reply Last reply
      0
      • N nimolZero

        hey there ! pls save me now. i want to run this code below at run time : (after we load form already) 1. i have one text box that contain code below dim Str$ for i as integer=0 to 5 for j as integer=0 to 5 for k as integer=0 to 4 str=i+j+k listbox1.items.add str next next next 2. one listbox for get the result 3. one command button for click to execute code in the textbox i wait for all of ur reply 2me na . thanks in advance regard from spider anatha

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        It can be done in VB.NET, but not VB6. This is called "Dynamic code compilation[^]". Be warned, the concepts involved are not for beginners.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        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