#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Not Urgent

When a function is executed, the VBA system must know the location of the
cell in which the function call is located.

Is it possible for the code within a function to get the location in the
spreadsheet wihtout forcing the user to include it as an extra argument??

Thanks in Advance
--
Gary's Student
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Not Urgent

set rng = Application.Caller

should give you what you want.

--
Regards,
Tom Ogilvy


"Gary's Student" wrote in message
...
When a function is executed, the VBA system must know the location of the
cell in which the function call is located.

Is it possible for the code within a function to get the location in the
spreadsheet wihtout forcing the user to include it as an extra argument??

Thanks in Advance
--
Gary's Student



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Not Urgent

Function Gary()
Debug.Print Application.Caller.Address
End Function


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary's Student" wrote in message
...
When a function is executed, the VBA system must know the location of the
cell in which the function call is located.

Is it possible for the code within a function to get the location in the
spreadsheet wihtout forcing the user to include it as an extra argument??

Thanks in Advance
--
Gary's Student



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Not Urgent

Tom & Bob:

Thank you both very much.
--
Gary's Student


"Bob Phillips" wrote:

Function Gary()
Debug.Print Application.Caller.Address
End Function


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary's Student" wrote in message
...
When a function is executed, the VBA system must know the location of the
cell in which the function call is located.

Is it possible for the code within a function to get the location in the
spreadsheet wihtout forcing the user to include it as an extra argument??

Thanks in Advance
--
Gary's Student




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
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
Urgent SBárbara Excel Worksheet Functions 5 April 24th 08 04:07 AM
Urgent-Urgent VBA LOOP Jeff Excel Discussion (Misc queries) 0 October 6th 05 05:46 PM
Macro help urgent urgent Dave Peterson[_3_] Excel Programming 0 September 4th 03 03:59 PM
Macro help urgent urgent chandra Excel Programming 0 September 4th 03 03:50 PM


All times are GMT +1. The time now is 03:35 AM.

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"