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. Subroutines in VB

Subroutines in VB

Scheduled Pinned Locked Moved Visual Basic
help
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.
  • M Offline
    M Offline
    Mahesh1679
    wrote on last edited by
    #1

    i have a two subroutines.I need to pass a value from one subroutine,and change the value of another variable.This change must reflect in the calling subroutine.This must me implemented with out using module variables. pls help me to find a solution

    S J 2 Replies Last reply
    0
    • M Mahesh1679

      i have a two subroutines.I need to pass a value from one subroutine,and change the value of another variable.This change must reflect in the calling subroutine.This must me implemented with out using module variables. pls help me to find a solution

      S Offline
      S Offline
      Stephan Wright
      wrote on last edited by
      #2

      could you post the "headlines" of your subroutines? Maybe in pseudocode. Because I wonder what you do want to do with which value. To me it sounds as if you want to do the following: Sub Subroutine1() ... Dim myvar as variant 'your variable ... Subroutine2(myvar) End Sub Sub Subroutine2(myvar) ... End Sub but I have no idea which value you want to change. Is this value another variable of Subroutine1? Maybe some lines of pseudocode would help or please be a little more precise *) where you do get the value from *) which value of another variable (where is it?) you do want to change Just try to describe the structure and/or actions in your program. Because from my point of view your description is a little to general! Stephan.

      1 Reply Last reply
      0
      • M Mahesh1679

        i have a two subroutines.I need to pass a value from one subroutine,and change the value of another variable.This change must reflect in the calling subroutine.This must me implemented with out using module variables. pls help me to find a solution

        J Offline
        J Offline
        Just Greeky Creek
        wrote on last edited by
        #3

        have u tried using ByRef

        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