Thanks for your help guys (or gals). I'll try out your suggestions.
Skip, I want to sort VBA arrays. Writing a vba program to do it is no problem but why reinvent the wheel if I don't have to.
I don't think this will solve my problem. Suppose I have
Sub Main ()
Input a range, myarr
a = myarr
...
Makechange(a)
...
Now consider two scenarios.
1. Makechange makes changes to a and I want the changed a to return to Main. Have the changes affected a in main?
2. As before only now...
I have done a fair amount of higher level language programming but am somewhat new to VBA. I've run into some issues I can't figure out.
1. How can I pass multiple values back to a calling sub program? For instance, I have the Cholesky decomposition that will be called by a variety of programs...
xwb, I'm trying to avoid optional arguments. The problem is that sub A calls subs B, C, D, E, ... and while there are overlaps, in general the subs require different information to be passed to them by A. I.m finding it too messy to employ optional arguments. There are also some other...
Thanks for your response. I'll set it up the way you recommend but I think there might be some problems. I'll wait until I've finished it all so I can be more specific if there are issues.
Two questions:
1) In the main program data is read in plus claculations using many allocatable arrays. One of the arguments in subroutine A called is another subroutine B. B needs much of the info from the main program that A doesn't need. How can I get the info to B without passing it through A...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.