We do not normally use UDFs to perform actions but to return values. S
I have used a subroutine. :-
'=================================
Dim Mywindowx As Range
'-------------------
Sub test()
windowx Application.ActiveCell
MsgBox (Mywindowx.Address)
End Sub
'--------------------
'-
Sub windowx(cellx As Range)
cellx.Value = "myname"
Set Mywindowx = Range(cellx, cellx.Offset(1, 1))
End Sub
'=================================
--
Message posted from
http://www.ExcelForum.com