Excel Events Conflict with VB and C# AddIns

Hi,
I have two com addins running in Excel. One is written in VB and the
other in C#. Both addins are interested in the Workbookopen event.
When the  event is triggered the c# code captures the event but the VB
code does not. If i disable the c# addin then the vb code works. Looks
like the c# addin is somehow blocking the vb events.

Anyone know how to fix this?

Many thanks,
Andy
0
excelprob (1)
9/6/2004 11:24:26 AM
excel 39879 articles. 2 followers. Follow

1 Replies
820 Views

Similar Articles

[PageSpeed] 23

There is only one WorkbookOpen event, so once one add-in hooks it, there 
is nothing for the other one to hook.

If you are hooking the WorkbookOpen event in your add-ins, this is 
likely your problem.

You may need to create a public function in each of your add-ins that 
executes the code, and CALL those functions from Excel's Workbook_Open 
event in the ThisWorkbook module.

It would be something like this (which is from the VB Help file):
' Call a Microsoft Windows DLL procedure. The Declare statement must be
' Private in a Class Module, but not in a standard Module.
Private Declare Sub MessageBeep Lib "User" (ByVal N As Integer)
Sub CallMyDll()
     Call MessageBeep(0)    ' Call Windows DLL procedure.
     MessageBeep 0    ' Call again without Call keyword.
End Sub

In this example, MessageBeep is the name of the function in the file 
user.dll, and two ways of calling it are shown.

Hope This Helps!


Mike Argy
Custom Office solutions and
Windows/UNIX applications




Andy wrote:
> Hi,
> I have two com addins running in Excel. One is written in VB and the
> other in C#. Both addins are interested in the Workbookopen event.
> When the  event is triggered the c# code captures the event but the VB
> code does not. If i disable the c# addin then the vb code works. Looks
> like the c# addin is somehow blocking the vb events.
> 
> Anyone know how to fix this?
> 
> Many thanks,
> Andy
0
Mike
9/6/2004 12:37:57 PM
Reply:

Similar Artilces:

Outlook conflicting with Windows Mail
I have Vista Business. I get e-mails from Yahoo groups. When I left click Reply to sender or Reply to group I get Outlook opening up to handle it, even though the e-mail is received via Windows Mail. I want that stopped. I use Windows Mail to handle everything, Outlook is just for handling Business contact info until I'm sure I want it permanent. The problem started when I downloaded the trial version of Outlook and it just started doing that BS on its own. How do I get it back to having Windows Mail handle that? Thank you, Mike Tried setting your mail handler in Internet Options...

Clip art in Excel 2007
Hello, I have two clip arts in my Excel 2007 one is check mark and the another is a "X" in a particular cell I would display the text "Balance", which I like to have the check mark clip art appear. If the same cell has the text "Not Balance" then I want to show the clip art with the "X" and the clip art with the check mark disappear. Is this possible? I would appreciate any tips. Thank you in advance. If you want check to appear when text in cell a1=balance and x when text reads no balance try this in B1 =IF(A1="balance...

excel 2007 schemas
PLEASE HELP :( i am trying to link a pdf file to excel thru a schema i think what i am missing to get the correct mapping is locking or labeling the column headings anyone out there who can help will earn major karma points thanks ...

Assign Macro to button in Excel doesnt work Any ideas?
I have followed the instructions in help but when I get to step 3 "right click to bring up shortcut menu & enter Assign Macro" the assign macro" option does not appear!! Any Ideas Hi Mike can you see assign macro - but it is greyed out? or is it not an option at all? if it is greyed out you'll notice around the button little diagonal lines, click on these and they should go furryish .. now try right mouse clicking. if the option is not there at all, please post back letting us know how you created the button. Cheers JulieD "Mike@Becketts" <Mike@B...

Arrow Keys in Excel #3
While typeing in Excel, my arrow keys suddenly changed from moving from "cell to cell" to scrolling the screen. I cannot figure out how to change the keys back so that they move from "cell to cell." Any suggestions? Hit the scroll lock key. -- Damon Longworth Don't miss out on the 2005 Excel User Conference Sept 16th and 17th Stockyards Hotel - Ft. Worth, Texas www.ExcelUserConference.com "Claude" <Claude@discussions.microsoft.com> wrote in message news:20EFD914-65E1-4B08-8522-F284276F7E2A@microsoft.com... > While typeing in Excel, my arrow...

Using a two-dimensional array in Excel 2002 or 2003
I am trying to improve my coding skills in Excel VBA and I just can't seem to find a good, very basic, example of how to use a 2-dimensional array. I've looked in several reference books & browsed VBA Forums but can't find an example I can understand. What I was trying to do was define a 3 x 4 Array that has a data type of Single. My sample data is located in Cells E1:H3. E F G H 1 3.4 8.1 11.6 100.3 2 5.2 7.3 45.2 632.4 3 1.7 9.6 39.7 161.5 I've been trying to use the LBound and UBound functions too, thinkin...

Timer event on forms
I have an Access 2002 db and while building a rather complicated report I would like the users to see a progress bar or timer that lets the user know that the system is working. I built a ‘lazy mans’ progress bar using objects and making them visible at various points in the process. There are about 10 steps which utilize DoCmd.RunSQL. If I try and add a timer event to show a progress bar the SQL running takes over the CPU and the event does not run or refresh. Any suggestions? Thanks for your time. Mark I solved my own problem. The timer event was in a loop and did not give focus to ...

Excel Macros #4
I am running Excel 2003 and when I start one of my worksheets I get a message about the worksheet having macros. When I go to Tools Macros there are none listed. I did attempt to create a macro years ago, under Excel 97 but I could never find it or use it. How can I get rid of any macro remnent when it does not show in the list of macros. The security message is a pain in the neck when I know that there is no macro in existance Thanks of any help DJT When you record a macro, Excel creates a module in which the code is stored. When you delete the macro, the module is not automatically de...

Exchange 5.5 Store.exe Event ID 4097
The following Dr Watson error has occurred 3 times over the last 3 weeks - I cannot determine any pattern or trend: The application, store.exe, generated an application error The error occurred on 04/30/2004 @ 13:26:29.025 The exception generated was c0000005 at address 0042466B (<nosymbols>) ========================================================== Any assistance will be appreciated. I have the "Recovey Tab" set to restart on all failures, and it has been restarting OK... ======================================================== Here is the entire entry from the drWts...

import fixed-length text file into excel
- 2 2299 Del Pietro M Wintervill NC 1:18:26 2:44:0 2:44:11 6:16 - 1 2045 Robert Marchinko M Salisbury NC 1:15:34 2:31:1 2:31:20 5:47 I have a text file where each field starts at same column and of th same length in each record. I tried cut&Paste, I tried opening it in excel as a tab delimited file I tried as a fixed-length file None of these worked. Data came in scrambled or into scrunched columns If the data were a table then cut&paste works great. What's the secret in loading above 2 records into Excel? I couldn' simulate the look ...

MS Office 12 Event ID: 5000
I am consistently seeing this error pertaining to MS Office 2007 on two Windows 2003 terminal servers. The error is as follows: Event Type: Error Event Source: Microsoft Office 12 Event Category: None Event ID: 5000 Date: 12/15/2009 Time: 4:35:52 PM User: N/A EventType office12asserttimer, P1 p1ml, P2 12.0.6425.0, P3 1, P4 0, P5 NIL, P6 NIL, P7 NIL, P8 NIL, P9 NIL, P10 NIL. I have Googled this problem, but can't find a workable solution. Any help would be greatly appreciated. Very strange, we've started to have the same issue, since yesterday 15 decemb...

Excel 2003 #21
When doing “Local Save As”, under Tools on the Save As dialog, there should be “Save Options” but this is not on menu?? Has this been disabled in office 2003?? There is no Local Save As for Excel--any version. You are likely using some kind of Document Management Software. If you upgraded Excel, you may have to upgrad the other program as well. tj "Ritu" wrote: > When doing “Local Save As”, under Tools on the Save As dialog, there should > be “Save Options” but this is not on menu?? Has this been disabled in office > 2003?? Ritu File>Save As>Tools>Genera...

Why with Excel Xp takes too much time to open and in 2003 fast?
I have 2 computers, in one I have Excel XP (2002) and in the other I have Excel 2003, I've been receiving files wich I need to check with my Excel XP, the problem is that it takes too much time to open, and when I try to open it with Excel 2003 it open normaly (fast). What can I do? Urgent, please I will thank you to send answer : eguevara2000@hotmail.com Thanks ________________________ Tengo 2 computadoras, una con Excel Xp (2002) y la otra con 2003, he recibido archivos pero con Excel XP tarda mucho tiempo en abrir los archivos, mientras que en 2003 lo hace normal (rapido), a ...

Event 1202 0x10d9
Iam getting this message in my event logs every 5 minutes: Security policies were propagated with warning. 0x10d9 : Unable to read from or write to the database. Advanced help for this problem is available on http://support.microsoft.com. Query for "troubleshooting 1202 events". For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. I can find plenty of info on 1202 events but none specific to 0x10d9. Any help would be greatly apprecited ...

How do I hide formulas in Excel cells?
I have a worksheet with lots of different formulas. I need to have the complete sheet show the formulas and not the results. I did this before a few years ago but don't remember how. I am working on Excel 2000. Any help would be greatly appreciated. TOOLS / OPTIONS / FORMULAS HTH, Gary Brown "Rita" wrote: > I have a worksheet with lots of different formulas. I need to have the > complete sheet show the formulas and not the results. I did this before a > few years ago but don't remember how. I am working on Excel 2000. Any help > would be gr...

Can we set the UI color scheme via VB[A} or XML?
Does anyone know a way to set the color scheme for the UI, using VB[A} or XML? Can this even be done? Thanks -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc Sorry for not qualifying the Excel version. It's v12 or higher. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc ...

Excel Window Menu
Hi all, I am using Excel 2000 and I am working with over 20 excel files at the same time. The window menu shows only the first 9 files and I want to know if it is possible to see all open workbooks in the window menu without clicking the "More Windows" button? Any help will be greatly appreciated. Oguz Hi Oguz. If you are using Windows XP as your operating system, you could right click on your XP toolbar and select properties, then check the 'Group similar taskbar buttons'. I just opened 24 files and it showed them all when clicking on the minimised toolbar button. R...

Excel and ebay lists
Has anyone found a way to put the contents of ebay files, including pictures, into an excel database? I am trying to keep track of prices for items sold. Thanks ...

Excel Link to another Excel file and formulas
I have a formula that I want to "fill" down through my spreadsheet ='I:\filepath\[filename.xls]worksheet!$B$5 When I fill the formula down it does not change the reference. e.g. ='I:\filepath\[filename.xls]worksheet!$B$6 ='I:\filepath\[filename.xls]worksheet!$B$7 ='I:\filepath\[filename.xls]worksheet!$B$8 Everything remains as referencing $B$5 How can I get around this issue? Thanks, RICK The problem is that your use of an absolute reference is holding the cell reference constant. Try changing the $B$5 to: $B5 if you want to keep the column set as B as you...

Excel #158
I recently completed testing at a temp office and on the test I was asked to perform a Pack and Go Wizard in Excel. What is a Pack and Go Wizard? There is a Pack and Go Wizard in PowerPoint, which allows you to package the PowerPoint presentation onto a disk or CD to be shown on another PC. That other PC does not necessarily need PowerPoint installed. Could that be what you tested on? "Cola" wrote: > I recently completed testing at a temp office and on the test I was asked to > perform a Pack and Go Wizard in Excel. What is a Pack and Go Wizard? ...

Excel spread sheet #2
Every time I open ANY excel document on this CP it displays each individual cell as a page.......how do I change this setting? Moving each page break takes too long abd does not alway work. Hi try this macro to remove them all at once: Sub remove_them() ActiveSheet.ResetAllPageBreaks End Sub -- Regards Frank Kabel Frankfurt, Germany "dlam25mmm" <dlam25mmm@discussions.microsoft.com> schrieb im Newsbeitrag news:94BDFE5F-6CB2-4717-BE90-14A4245E0023@microsoft.com... > Every time I open ANY excel document on this CP it displays each individual > cell as a page.......how d...

Excel says: "links cannot be updated"
I have two linked files. One references cells from the other. When opening the file with the references in it while the other file is closed Excel gives the error message "This workbook contains one or more links that cannot be updated". However, there's a button "Edit links..." that shows no problems with the linked file. It's status is "OK". All of the links are indeed updated, so the error message seems wrong. Anyone seen this before? The two files are normal Excel-files (version 2003), the "update remote references"-option is checked an...

PDF Format for Excel
Can Excel spreadsheets be save in PDF format? Thom, Excel can't save files directly to PDF files. You need a third party product like Adobe's Acrobat (full version, not just the free Reader), or something like PDF995 (www.pdf995.com) . -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Thom" <thancox@lgbcpa.com> wrote in message news:090401c3cfb4$a5eef630$a501280a@phx.gbl... > Can Excel spreadsheets be save in PDF format? Thom, Yes, but you need a program capable of doing so... A popular one is Adobe Acrob...

Chart disappears in Excel 2000 after scale is changed
When the scale of the chart is changed, the chart disappears. The chart and its data are on the same worksheet. ...

Why doesn't the tools/options work in Excel?
About a month ago I was not able to get to the "Options" screen under tools. I still can't even after reloading and repairing Office. I can get to the "options" under Word but not Excel. I am using Office 2003. Help me get it so that I can get to Tools/Options. Is it gone or what happens when you try to open options? If it's gone, do view>toolbars>customize. select commands, scroll to toolbar and select in the left pane, in the right pane scroll to options (at end) then drag it to its place. You could try to rename *xlb to something like *.bak res...