![]() |
How I can create a function with return argument
I have a macro program numoffday
Sub offdays() li_sunday = .Cells(i, 41).Value int offDays = numoffday(li_sunday) End Sub Please let me know how I can create a function numoffday() with integer return value in Excel macros |
How I can create a function with return argument
Please tell us in words what you need the function to do
best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "pol" wrote in message ... I have a macro program numoffday Sub offdays() li_sunday = .Cells(i, 41).Value int offDays = numoffday(li_sunday) End Sub Please let me know how I can create a function numoffday() with integer return value in Excel macros |
How I can create a function with return argument
Generally a function has the following form...
public function numoffday() as long numoffday = 12345 end function I used a long instead of an integer as it is actually more efficient to use a long on a 32 bit machine... -- HTH... Jim Thomlinson "pol" wrote: I have a macro program numoffday Sub offdays() li_sunday = .Cells(i, 41).Value int offDays = numoffday(li_sunday) End Sub Please let me know how I can create a function numoffday() with integer return value in Excel macros |
All times are GMT +1. The time now is 10:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com