Forum Discussion
LaPaz5640
Apr 10, 2020Copper Contributor
Indirect Variable Addressing
I've written vba code that includes the declared variable... Dim PB_Donors As Integer I'm now testing a Function that will return the following variables GroupCountName As String Grou...
gyankosh
Apr 11, 2020Brass Contributor
Have a few doubts.
The declared variable is an integer.
If you want to send the final value to PB DONORS, why don't you declare it at module level or public i.e. project level variable.
The output of first function is a string.What you want to do with that string. PB Donors is not going to take String as input as you have explicitly declared it.
http://gyankosh.net/vba
- LaPaz5640Apr 16, 2020Copper ContributorThanks for your input. I eventually found a way around this problem by creating named ranges in each of the pertinent Excel sheets. The ranges had the names CC_Donors, PB_Donors, etc and I was able to save the returned data for my function routine to the named ranges. The originally DIM declarations CC_Donors, PB_Donors, were no longer used. Maybe there is another way around this issue, but for now, it got me past my impasse! Thanks for participating.