LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Help With A Variable And Functions

Hi Gang

I need some help with variables with functions. I've got a main
function that does some processing with a variable MyValue. I need to
create a sub function that changes the value of MyValue so that when
the sub function is done the main function knows what the new value of
MyValue is. How do I do this???

Please help,
Andy


Public Sub MyMainFunction()
MyValue = 10
Call MySubThatChangesMyValue

...more processing that relies on the changed MyValue...
End Sub

------------------------------------------------

Sub MySubThatChangesMyValue()
....some code that changes MyValue....
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Num and Sum functions as a variable Chris Freeman Excel Programming 5 June 23rd 09 07:30 AM
Add Description of Variable for User-Defined Functions Jonas[_3_] Excel Programming 5 October 18th 07 04:50 PM
How to set up variable data ranges in nested functions Tom@AML Excel Worksheet Functions 3 July 10th 07 12:04 AM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
are variable table-array names in functions possible? JimH Excel Discussion (Misc queries) 2 April 7th 05 09:51 PM


All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"