Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Never tried this location in excel
Curt,
If you mean with a worksheet function, then No. This can only return a value. e.g. Public Function InvalidWorksheetFunction(argValue As Variant) As Long Debug.Print Application.Caller.Offset(0, -1).Address Application.Caller.Offset(0, -1).Value = argValue InValidWorksheetFunction = 1 End Function However, called from VBA, this is valid Public Function ValidFunction(argBase As Range, NewValue As Variant, Optional ColOffset As Long = -1) As Boolean argBase.Offset(0, ColOffset).Value = NewValue ValidFunction = True End Function although you should add checking of a valid Offset, so you are not off the sheet. NickHK "Curt" wrote in message ... Is it possible to call a procedure and have excel put in cell address of calling location. Have a procedure that must be called from many locations and return data to location in precedding column. Never tried this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro - save to current location vs excel default location | Excel Discussion (Misc queries) | |||
Location of Excel Toolbar | Excel Discussion (Misc queries) | |||
Excel startup location | Setting up and Configuration of Excel | |||
Never tried this location in excel | Excel Programming | |||
Mouse Location, Movement and Spreadsheet Location | Excel Programming |