Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default XLA: User-Specific, Not Document-Specifie

Seems pretty clear: .XLAs are not document specific. Instead they're
associated with a UserID.

Apart from setting References, is there any way around this? My
preference would be to make a .XLA associated with a specific document
instead of a user.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default User-Specific, Not Document-Specifie

Not quite sure but do you mean, maybe somethinng like this

Sub test2()
' entry point in the addin, eg called by a button

If Not wbOK(True) Then Exit Sub

Range("A1") = Now
End Sub

Function wbOK(Optional bMsg As Boolean) As Boolean
Dim sName As String
Dim wb As Workbook
Const WB_NAME As String = "BOOK" ' specific document name

On Error Resume Next
Set wb = ActiveWorkbook
sName = wb.Name
On Error GoTo errExit

If Left$(UCase(sName), Len(WB_NAME)) = WB_NAME Then
wbOK = True

ElseIf bMsg Then
MsgBox "The addin cannot procees " & sName
End If

errExit:
End Function

Regards,
Peter T



"PeteCresswell" wrote in message
...
Seems pretty clear: .XLAs are not document specific. Instead they're
associated with a UserID.

Apart from setting References, is there any way around this? My
preference would be to make a .XLA associated with a specific document
instead of a user.



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
Sharing violation on Excel files and cannot find the path specifie Will Excel Discussion (Misc queries) 0 December 7th 09 01:21 PM
Hyperlink to a specific place in a document Al Excel Worksheet Functions 3 June 29th 09 05:53 PM
Document Specific Autocorrection TheBroon Excel Worksheet Functions 3 July 14th 08 09:40 PM
print user ID on a document JoAnn Excel Discussion (Misc queries) 1 March 28th 07 09:31 PM
Macro to open specific document Thew21 Excel Discussion (Misc queries) 1 December 13th 06 01:18 PM


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