#1   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming,microsoft.public.excel.sdk
external usenet poster
 
Posts: 30
Default xlfCaller

If I use Caller() in VBA code, I get a reference to the cell which includes
the worksheet and workbook, but if I use xlfCaller, it only appears to give
me the cell. How can I get the other required information?

Thanks,
Aaron Queenan.


  #2   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming,microsoft.public.excel.sdk
external usenet poster
 
Posts: 811
Default xlfCaller

"Aaron Queenan" wrote in message
...
If I use Caller() in VBA code, I get a reference to the cell which

includes
the worksheet and workbook, but if I use xlfCaller, it only appears to

give
me the cell. How can I get the other required information?


Hi Aaron,

The xlSheetNm function can be used to return the name of the workbook
and worksheet corresponding to a reference returned by xlfCaller. Usage
looks something like this:

XLOPER xlRef, xlSheetName;
Excel4(xlfCaller, &xlRef, 0);
Excel4(xlSheetNm, &xlSheetName, 1, &xlRef);
// Do something here.
Excel4(xlFree, 0, 1, &xlSheetName);

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


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



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