LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Userdefined Function and recalculatiing XL 2k3

Hi all,
I am using something like that:

WorkBook A has the Document Property "Title" set to 'A'.
WorkBook B has the Document Property "Title" set to 'B'.

In each Workbook (A and B) is a VBA-function:

Function myGetBulitInProp(ByVal PropName As String)
myGetBuiltInProp=Null
On Error Resume Next
For Each prop in ActiveWorkbook.BuiltInDocumentProperties
If (prop.name = PropName) Then
myGetBuiltInProp=prop.Value
End If
Next
End Function

i.e. Cell A1 in Workbooks A and B contains the formula:
=myGetBuiltInProp("Title")
This results in the correct values for each Workbook.

The Problem:
Opening both WorkBook A and WorkBook B results in (displayed) Value 'B'
in Cell A1 in both WorkBooks (Document Properties are unchanged and
still correct).
Doing so with more than two Workbooks sets all the values to the one of
the last opened WorkBook.

I'm running Excel 2003 SP2 (Built 11.6560.6568) and yes, automatic
recalculation is activated.
Any ideas?

Thanx in advance

Thomas
 
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
number of userdefined formats nist Setting up and Configuration of Excel 0 March 2nd 06 03:27 PM
UserDefined Functions ExcelMonkey[_190_] Excel Programming 0 March 21st 05 03:05 PM
userdefined trendline derteight Excel Programming 1 October 15th 04 01:45 PM
How to use multiple sheets with range in userdefined function. Wouter HM Excel Programming 6 February 13th 04 02:47 PM
UserDefined Function that opens another w/book Regan Excel Programming 1 September 1st 03 10:21 AM


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

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

About Us

"It's about Microsoft Excel"