Solved

VB.net Excel Add-in TaskPane not opening

Posted on 2016-10-08
3
86 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

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 22

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

739 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