Solved

VB.net Excel Add-in TaskPane not opening

Posted on 2016-10-08
3
46 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 18

Assisted Solution

by:crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the assistance
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
second highest value difference 11 24
Manipulate Data Quickly 2 13
VB.NET HttpWebRequest 12 30
Name Rotation 11 24
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now