how do i set a value to a range using a function from module in excel vba?
- by gadym
hello all,
i want to do a simple function in a module in excel vba,
so i can use it as a custom function in excel.
(i use excel 2003, or 2007 , it's doesnt matter)
i create a function(!) in a new workbook and it's looks like this:
Function a()
Sheets(1).Range("A1").Value = 4
end function
but when i try to use it on the sheet1 it's wont work!
i tried many things.
how can i make this work (with no workarounds, i want to use it as a custom function) ?
please help.
thanks,
gadym