Solved

VB.net Excel Add-in TaskPane not opening

Posted on 2016-10-08
3
69 Views
Last Modified: 2016-10-11
Hi
I have an Excel 2007 Add-in with task panes. They open fine in Excel 2007 and 2010 but don't when the add-in is installed in Excel 2013.
This is a hard one to figure out? Is there perhaps extra code that I could use to force the task pane to open?
Thanks
0
Comment
Question by:murbro
3 Comments
 
LVL 19

Assisted Solution

by:crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access earned 250 total points
ID: 41835475
do the defaults allow code to run? Perhaps you need to look at the Trust Center Settings.
0
 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 250 total points
ID: 41837556
I had a similar situation with an old add-in using Excel 2003 commandbars to make a menu.
It worked in Excel 2007 but not in Excel 2013.
The add-in workbook open event run, but the commandbars are not created.
I don't know why it is not working.
I solved it by delaying the run for 1 second, using Application.OnTime, and resetting the timer after run.
You can find the OnTime code here http://www.cpearson.com/excel/OnTime.aspx

I could build the delay in the code, but if that is not possible, you can use another add-in with the delay to open the task pane add-in, see attached file.
Then the Task pane add-in must not be in the Add-In list.

In attached file this code is in Module1

Option Explicit
Public RunWhen As Double
Public Const cRunIntervalSeconds = 1    'delay time 1 second
Public Const cRunWhat = "OpenAddIn"

Sub StartTimer()
    RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
    Application.OnTime EarliestTime:=RunWhen, Procedure:=cRunWhat, _
        Schedule:=True
End Sub

Sub StopTimer()
    On Error Resume Next
    Application.OnTime EarliestTime:=RunWhen, Procedure:=cRunWhat, _
        Schedule:=False
End Sub

Sub OpenAddIn()
    Application.Workbooks.Open "C:\Test\TestAddIn.xlam" 'Change to actual add-in path and name
    StopTimer
End Sub

Open in new window


Change the file and path name to the add-in to open in the sub OpenAddIn

To activate the timer this is in the Workbook module
Private Sub Workbook_Open()
    StartTimer
End Sub

Open in new window

AddInOpen.xlam
0
 

Author Closing Comment

by:murbro
ID: 41839480
Thanks for the assistance
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question