Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
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
Macro - save to current location vs excel default location leezard Excel Discussion (Misc queries) 0 October 28th 08 03:04 PM
Location of Excel Toolbar [email protected] Excel Discussion (Misc queries) 1 March 4th 08 04:48 AM
Excel startup location [email protected] Setting up and Configuration of Excel 4 June 1st 07 12:50 PM
Never tried this location in excel Ken Excel Programming 0 January 15th 07 10:49 PM
Mouse Location, Movement and Spreadsheet Location TCook Excel Programming 3 October 3rd 05 10:23 PM


All times are GMT +1. The time now is 02:13 PM.

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

About Us

"It's about Microsoft Excel"