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: 1
Default Returning value from function

I don't understand how to return a value from a function. If I wanted to
return the value for X in testee to test, how can I fix this code?

Sub test()
Dim X As Integer
X = 1
testee (X)
MsgBox X
End Sub

Function testee(X)
X = 1 + 1
End Function


 
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
Function returning unexpected value Paul Excel Worksheet Functions 7 July 22nd 09 08:29 PM
INDIRECT function returning REF# Don Kline Excel Worksheet Functions 2 March 23rd 09 03:13 PM
IF Function Returning Range Brian Excel Discussion (Misc queries) 0 September 16th 08 03:19 PM
IF Function returning range Brian Excel Discussion (Misc queries) 5 September 16th 08 02:26 AM
MAX Function not returning correct value Phil Excel Worksheet Functions 4 April 28th 06 10:14 PM


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

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

About Us

"It's about Microsoft Excel"