+ Reply to Thread
Results 1 to 7 of 7

adding same variable together from one subroutine to the next

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

    adding same variable together from one subroutine to the next

    I am trying to add the same variable for use in an equation from one subroutine to the next but it does not appear to be changing. I use a separate equation to sum this variable with a counter. The variable looks like it is just carrying over from the previous subroutine without ever changing. It has been dimensioned outside as a single. Any ideas?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: adding same variable together from one subroutine to the next

    Have you only declared the variable in one place?

    Can you post the code?
    If posting code please use code tags, see here.

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

    Re: adding same variable together from one subroutine to the next

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Is that all the code?

    Where are the sub headings?

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

    Re: adding same variable together from one subroutine to the next

    this is just the part of code that is giving me problems. The sub headings are before and after the code that was posted. If you would like, I could post the whole routine.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: adding same variable together from one subroutine to the next

    That would help as it would show exactly how everything has been declared.

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

    Re: adding same variable together from one subroutine to the next

    Here you go. Please don't hate me because I have been writing this code for the past few weeks and it is very long. The inputs come off a user form. I am currently debugging before I make a presentation. If you have any pointers outside of my original question, please add them.

    Please Login or Register  to view this content.

+ 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