Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Getting UDF to run against the sheet it's been entered on...

I've got a problem with a UDF that I've written where it's running against
the active sheet, rather than the sheet that it's been entered on.

Is there anyway to limit the function so that it runs against the sheet it
was entered on rather than running against the active sheet?

I've tried looking around for this and have discovered the following which
don't seem to work...unless I'm using them wrong :-)

Application.Caller
Application.ThisCell.Worksheet

Any ideas?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Getting UDF to run against the sheet it's been entered on...

Can you post up your UDF code?
George wrote:
I've got a problem with a UDF that I've written where it's running against
the active sheet, rather than the sheet that it's been entered on.

Is there anyway to limit the function so that it runs against the sheet it
was entered on rather than running against the active sheet?

I've tried looking around for this and have discovered the following which
don't seem to work...unless I'm using them wrong :-)

Application.Caller
Application.ThisCell.Worksheet

Any ideas?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default Getting UDF to run against the sheet it's been entered on...

So close -- try something along these lines:

Function ShowIt()
Application.Volatile
ShowIt = Sheets(Application.Caller.Worksheet.Name).Range("A 1")
End Function

On Oct 10, 9:29 am, George wrote:
I've got a problem with a UDF that I've written where it's running against
the active sheet, rather than the sheet that it's been entered on.

Is there anyway to limit the function so that it runs against the sheet it
was entered on rather than running against the active sheet?

I've tried looking around for this and have discovered the following which
don't seem to work...unless I'm using them wrong :-)

Application.Caller
Application.ThisCell.Worksheet

Any ideas?


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
Expand sheet as information is entered akkrug New Users to Excel 2 June 18th 09 08:45 PM
data entered in each coloumns of one sheet to be extracted with r. rrenga72 Excel Discussion (Misc queries) 0 March 6th 08 09:51 PM
Updating VB for info entered in a sheet Darin Kramer Excel Programming 4 August 14th 07 06:26 PM
Excel: have add'l rows entered in sheet 1 always show up in sheet Sooz in Grants Pass Excel Worksheet Functions 0 September 18th 06 01:33 AM
can entered data in sheet 1 be automatically pasted in sheet 2 Adnan Jahangir Excel Discussion (Misc queries) 1 February 23rd 06 10:06 AM


All times are GMT +1. The time now is 07:53 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"