+ Reply to Thread
Results 1 to 6 of 6

What is easier? writing many sub routines or just one long one.

Hybrid View

  1. #1
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,663

    Re: What is easier? writing many sub routines or just one long one.

    Pass values from one procedure or function via its argument list.
    Sub firstone()
        x = InputBox("give me a number")
        newnumber = myadder(x)
        MsgBox newnumber
    End Sub
    Function myadder(ByVal numbertoprocess As Double) As Double
        myadder = numbertoprocess + 1
    End Function
    Ben Van Johnson

  2. #2
    Registered User
    Join Date
    01-18-2013
    Location
    Baton Rouge, LA
    MS-Off Ver
    MS Office 2010
    Posts
    25

    Re: What is easier? writing many sub routines or just one long one.

    Thank you AB33. That solved it. Now on to rest of code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1