Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Addins causing problems


I have a PHP script that uses COM objects to access a spreadsheet. The
problem is, the cell that has the value I want to retrieve cannot
calculate the value; it gives an "unknown name" error. If I stop the
script, remove all the addins, and then add them back in, it works like
it should (but this would have to be done every time the script is run,
so doing this manually isn't really an option). Everything was also
working properly before we made a slight modification to the
spreadsheet (but not the addins). Does anybody know where the problem
lies? The thing that confuses me is that it works when all the addins
are removed and then added in again, so it seems like the excel file
and the script are fine, but the very same addins were working
earlier.

If anyone can help me, I'd be very thankful.


--
Andrew-
------------------------------------------------------------------------
Andrew-'s Profile: http://www.excelforum.com/member.php...o&userid=24757
View this thread: http://www.excelforum.com/showthread...hreadid=383279

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel addins causing problems with PHP/COM script


I am not sure why you are getting that error.

I am not sure what is the solution for that, but there is way t
disable and enable addins using macro.


AddIns("Access Links").Installed = False ' will disable Access Link
addin

AddIns("Access Links").Installed = true ' will enable Access Link
addin


so can actually use this code in workbook_open and workbook_close

like in workbook_open you can disable all addins and in workbook_clos
you can enable all disabled addins, so when your workbook is opene
all the addins are disabled and before the workbook is closed all th
disabled addins are enalbed.



this code has to be in "this workbook"

Private Sub Workbook_BeforeClose(Cancel As Boolean)
AddIns("Access Links").Installed = true' will disable Access Link
addin
'and more
End Sub

Private Sub Workbook_Open()
AddIns("Access Links").Installed = False ' will disable Access Link
addin
'and more

End Su

--
anilsolipura
-----------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...fo&userid=1627
View this thread: http://www.excelforum.com/showthread.php?threadid=38327

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel addins causing problems with PHP/COM script


Thanks for your help. Actually, the only way it will work is if the
addins are disabled, and the re-enabled at startup. So I made a macro
called Workbook_Open:

Private Sub Workbook_Open()
addins("Analysis ToolPak").Installed = False
addins("Analysis ToolPak - VBA").Installed = False
addins("Conditional Sum Wizard").Installed = False
addins("Lookup Wizard").Installed = False
addins("Solver Add-in").Installed = False
addins("Analysis ToolPak").Installed = True
addins("Analysis ToolPak - VBA").Installed = True
addins("Conditional Sum Wizard").Installed = True
addins("Lookup Wizard").Installed = True
addins("Solver Add-in").Installed = True
End Sub

Unfortunately, it only works if I manually run the macro. I don't think
it's running when the workbook is opened.


--
Andrew-
------------------------------------------------------------------------
Andrew-'s Profile: http://www.excelforum.com/member.php...o&userid=24757
View this thread: http://www.excelforum.com/showthread...hreadid=383279

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel addins causing problems with PHP/COM script


It should work.

You have the paste the code at correct location.
go to tools-macro-visual basic editor- double click "this workbook",
paste the below code.






Private Sub Workbook_Open()
addins("Analysis ToolPak").Installed = False
addins("Analysis ToolPak - VBA").Installed = False
addins("Conditional Sum Wizard").Installed = False
addins("Lookup Wizard").Installed = False
addins("Solver Add-in").Installed = False
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
addins("Analysis ToolPak").Installed = True
addins("Analysis ToolPak - VBA").Installed = True
addins("Conditional Sum Wizard").Installed = True
addins("Lookup Wizard").Installed = True
addins("Solver Add-in").Installed = True
End Sub


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=383279

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel addins causing problems with PHP/COM script


Where do I double click "this workbook"? When I go into the Visual Basi
Editor, all I get is a window with a menu bar and a toolbar.

Thanks again for your help

--
Andrew
-----------------------------------------------------------------------
Andrew-'s Profile: http://www.excelforum.com/member.php...fo&userid=2475
View this thread: http://www.excelforum.com/showthread.php?threadid=38327



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel addins causing problems with PHP/COM script


When you go to vba editor,

go to view-project explorer, this will make project explorer visible
it is visible by default.

Go to project explorer toolbar,now you will see vb
project(your_file_name), double click it to expand, double clic
"microsoft excel objects" to expand, now you see "this workbook"
double click the "this workbook" and paste the below code .

Private Sub Workbook_Open()
addins("Analysis ToolPak").Installed = False
addins("Analysis ToolPak - VBA").Installed = False
addins("Conditional Sum Wizard").Installed = False
addins("Lookup Wizard").Installed = False
addins("Solver Add-in").Installed = False
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
addins("Analysis ToolPak").Installed = True
addins("Analysis ToolPak - VBA").Installed = True
addins("Conditional Sum Wizard").Installed = True
addins("Lookup Wizard").Installed = True
addins("Solver Add-in").Installed = True
End Su

--
anilsolipura
-----------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...fo&userid=1627
View this thread: http://www.excelforum.com/showthread.php?threadid=38327

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel addins causing problems with PHP/COM script


For some reason the project explorer wasn't visible by default. Than
you for your help, that got it to work and startup and close. However
what I needed was for the addins to be deactivated and then reactivate
as soon as the file opens (for some reason, this is the only way i
works, and I have no idea why). I used this code instead:

Private Sub Workbook_Open()
addins("Analysis ToolPak").Installed = False
addins("Analysis ToolPak - VBA").Installed = False
addins("Conditional Sum Wizard").Installed = False
addins("Lookup Wizard").Installed = False
addins("Solver Add-in").Installed = False
addins("Analysis ToolPak").Installed = True
addins("Analysis ToolPak - VBA").Installed = True
addins("Conditional Sum Wizard").Installed = True
addins("Lookup Wizard").Installed = True
addins("Solver Add-in").Installed = True
End Sub

Now it works.

Thank you very much for your help

--
Andrew
-----------------------------------------------------------------------
Andrew-'s Profile: http://www.excelforum.com/member.php...fo&userid=2475
View this thread: http://www.excelforum.com/showthread.php?threadid=38327

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
Special Characters causing problems Vickie Excel Discussion (Misc queries) 1 November 25th 08 09:42 PM
Watermark Causing Print Problems kbellando Excel Discussion (Misc queries) 0 March 15th 08 01:12 AM
my personal.xls file is causing problems Chrisinct Excel Discussion (Misc queries) 3 December 7th 06 03:28 PM
Rand () causing Problems. JCary Excel Discussion (Misc queries) 1 March 6th 06 10:38 PM
Items in disabled items list - unknown excel addins causing probs Rich Excel Programming 4 May 16th 05 10:31 PM


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