Results 1 to 6 of 6

Can you pass variable values from one macro to a Called Sub?

Threaded View

TryToExcel Can you pass variable values... 08-15-2010, 06:40 PM
shg Re: Can you pass variable... 08-15-2010, 07:13 PM
TryToExcel Re: Can you pass variable... 08-15-2010, 07:14 PM
shg Re: Can you pass variable... 08-15-2010, 07:20 PM
TryToExcel Re: Can you pass variable... 08-15-2010, 07:51 PM
romperstomper Re: Can you pass variable... 08-16-2010, 04:44 AM
  1. #1
    Registered User
    Join Date
    07-21-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    44

    Can you pass variable values from one macro to a Called Sub?

    I have a macro that is quite long with several "Goto" and "Return" situations with 30+ lines of code. I want to streamline the main macro by making several "Call" routines but I want the called Subs to process the data based on what some of the variable values are in the main macro.

    e.g - Cells (r1,c1) or valTest = ? in main macro when "Call ????" is made. "r1" and "c1" will tell the called Sub ???? where to start processing data because it will evaluate "r1" and "c1" from the main macro.

    Is there a way to have the called Subs acknowledge the variable values of the main macro?

    Danny
    Last edited by TryToExcel; 08-16-2010 at 08:15 AM.

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