Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I seem to have this really weird problem and I am not sure how to fix. Let me explain via an example: 1. Open a new workbook. 2. Open VBE and create a new module 3. In the module simply type a comment: This is file 1 4. Save As Add-In c:\test.xla 5. In the module edit the line to read: This is file 2 6. Save As Add-In c:\temp\test.xla <<__ Must be same filename but different directory 7. In any module: With AddIns.Add(Filename:="c:\test.xla") .Installed = True End With Edit the module and confirm the comment : This is file 1 With AddIns.Add(Filename:="c:\test.xla") .Installed = False End With With AddIns.Add(Filename:="c:\temp\test.xla") .Installed = True End With 8. Edit the module and confirm the comment IT IS STILL: This is file 1 i.e. the original file! 9. Close the file and exit from Excel, then double click on "c:\temp\test.xla" and I get an error message saying the file is already open. 10. Excel Tools Add-Ins and uncheck test and exit excel With AddIns.Add(Filename:=" c:\temp\test.xla") .Installed = True End With 11. Edit the module and confirm the comment IT IS STILL: This is file 1 i.e. the original file! 12. Excel Tools Add-Ins and uncheck test and exit excel 13. From explorer double-click on "c:\temp\test.xla" 14. Edit the module and confirm the comment: This is file 2 In summary, once a file has been opened from a particular location, even if you: With AddIns.Add(Filename:="c:\temp\test.xla") .Installed = False End With Any attempt to load the file from another location using AddIns.Add simply opens the file from the original path. In VBA code how can I update to add the Add-In the new location? -- Trefor |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Weird VBA Behaviour | Excel Worksheet Functions | |||
Weird WindowsMediaPlayer behaviour | Excel Discussion (Misc queries) | |||
Excel2000: Weird behaviour in VBA | Excel Discussion (Misc queries) | |||
Weird Cell Behaviour | Excel Programming | |||
Weird range property behaviour | Excel Programming |