Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 5
Default Desperately seeking ACTIVE.WORKBOOK function for XLM

I'm trying to push the name of the document where I start running a macro so I can get back there after activating a master document to which I'm copying data.

I'm programming in XLM which is a lot like worksheet functions so I'm hoping maybe this is a place where this kind of question might be welcomed. I have gotten responses elsewhere on visual basic solutions, but I'm way down the rabbit hole in XLM already.

e.g. http://www.mrexcel.com/forum/showthr...34#post2619834

So I have tried using the ACTIVE.CELL function that, according to my Excel 2.2. manual, returns a cell reference with a workbook name as a prefix (or worksheet name, not sure which) but I can't get the evaluate tool to return that reference although I can use ACTIVE.CELL in formulas such as by selecting a cell and then making a call like:
Code:
=IF(ACTIVE.CELL100,"true value","false value")
lacking the evaluater I can't figure out what is wrong with the follow language that throws an error -- now it may be that ACTIVE.CELL is working fine, but my reference for the ACTIVATE command is in the wrong syntax, and or ACTIVATE can't handle an argument that has a cell reference as well as a workbook name.
Code:
              A
        
154 =ACTIVE.CELL()
. . .
166 =ACTIVATE(A154)
Complicating things is that back in 2.2 you couldn't have separate worksheets in the same document, so worksheet meant workbook. It is kind of disappointing that Excel didn't stick with the standard reference Document instead of Workbook.

They obviously knew that was the more universal reference because there is a DOCUMENTS() function, but that returns an alpha list of open documents, i.e. workbooks, without any indication of what is the active workbook. And I don't seem to find any THIS.DOCUMENT() or ACTIVE.DOCUMENT() function for returning the active workbook name.

There is an ACTIVATE.PREV() command, but that, unfortunately doesn't take you to the previously active document but to the previous document in the list under the WINDOW menu.

Once I find the function I'm looking for, then there is the problem of calling it. Normally you would put a name in quotes inside the function, e.g. ACTIVATE("pushedworkbook.xls") , but when you have stored the name in a Macro cell by hopefully some function that someone can identify for me, do you call it with an unquoted cell reference to the macro, e.g. ACTIVATE(A154).
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
Active Workbook Kim Excel Discussion (Misc queries) 8 June 1st 10 11:33 PM
Seeking Improvement on excel function wilchong via OfficeKB.com New Users to Excel 27 September 4th 09 04:24 AM
Desperately Seeking Offset Formula!! Jenny B. Excel Discussion (Misc queries) 3 July 27th 07 09:30 PM
Active Workbook online. tamato43 Excel Discussion (Misc queries) 0 May 25th 05 04:38 PM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


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