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
844 Views

Similar Articles

[PageSpeed] 48

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:

Vertical Indent in Excel 2002
Please help me to create Vertical Indent in Excel 2000 or 2002 because the border line are very near to the text given in a table, it looks very congested in the gap between lines and text when we use auto fit to rows option. there is any solution for this please help me i want to know the option. No such feature as Vertical Indent. You can use Alt + Enter to provide a line feed at top and bottom of cell. Select a cell then hit Alt + Enter Type the text you need then hit Alt + Enter then Enter. This will give you a blank line at top and bottom. Gord Dibben MS Exc...

excel columns keep changing size
I have a spreadsheet that I want to print on legal sized paper. I have 5 columns that I want to be as wide as possible and fit on the paper, landscape format. Every time I try to change the font size of the text, excel automatically changes the columns size. ALso, even though it says that the font is 48 points, it shows up as very tiny on the screen and also on paper. What is going on? Check your pages set up settings. Go to sheet in page set up and check to see if the print area is empty this could have a range in it. If it does and this is too large for th paper you are using then it wi...

Excel Formatted Spreadsheet To SQL ?
Hello, Is there any reasonably straightforward way to convert an Excel spreadsheet, or part of one, to a format that SQL would accept ? Thanks, Bob Usually the method that works is to save the worksheet in CSV format. Then import the CSV format into your database. Access will import CSV and so wil a number of other databases. -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229 View this thread: http://www.thecodecage.com/forumz/showthread.php?t=196450 http://www.the...

C: drive copy / backup to D:
I have installed a second hard drive (D:) which I intend to be a backup for the C: drive. All I would like to do is copy the entire C: drive to the D: drive on a weekly schedule. I've looked into the Backup utility in XP and it's close to what I want, but it makes a bkf file rather than a copy. This is not as convenient for me (I'd like to be able to manually examine the files on D:) also I read the bkf file is corrupted even with a single bit error. I've looked at some other freeware programs but its the same deal, although the compressed format differs from product ...

missing excel VBA help file
I'm missing the excel 97 VBA help file "VEenUl3.hlp". I assume this file is on the software distribution pack that came with my computer. If it is do I reinstall excel or can I just copy the help file from the distribution pack? Finally I may not have the distribution pack since I've moved three times in the five years since the computer was purchased. How would I get a copy if I need it? I'm using windows 98. Thanks for your help John VBA and help files are not part of normal Office install. ie. Office 9 or Excel 97 *not* Windows disk required. Perhaps you ...

How do I read Pocket Excel files from Excel
Just got an Ipaq and trying to use ActiveSync to synchronise speadsheet files between that and my desktop. Unfortunately, when I update the file using Pocket Excel on the Ipaq, it is converted to .pxl format, which the desktop version of Excel (2000) won't read! How do I get round this one? ...

How To Create Order Form in Excel
Hey, I am trying to create a fundraiser order form in Excel and I don't know how to slant the cells. I angled the words at a 45degree angle and I want the whole cell to transform that way. Any advice? You can't slant the cell itself. If my comments have helped please hit Yes. "MAllen" wrote: > Hey, I am trying to create a fundraiser order form in Excel and I don't know > how to slant the cells. I angled the words at a 45degree angle and I want the > whole cell to transform that way. Any advice? ...

How to create a line chart with two X-axes in Excel
PLEASE HELP ME!!!!! How can I create a line chart with two X-axes in Excel? select one of your data series and change axis to secondary. <chart><<chart options><Axis> Select secondary x axis. "JaVaughn" wrote: > PLEASE HELP ME!!!!! How can I create a line chart with two X-axes in Excel? Hello, thank you for replying. Which chart type would allow for 2 X-axes. The only chart type that I know that allows for 2 axes is "Line Chart with 2 Y-axes". For the above-mentioned chart, the option to designate a primary and secondary x-axis is display...

prevent Excel from EVER automatically converting numbers to dates
in Excel v. X for Mac how do I permanently prevent Excel from EVER automatically converting numbers to dates. Formatting individual cells as text will not work in my applications. I need to disable this funtion. Not possible - there's no preference option to turn this off. Instead of preformatting as text, entries can be made with an apostrophe as a prefix: '3/4 You might be able to use an event macro to change it back retroactively, but that depends on knowing what format the user entered it. For instance, 3/4, 3-4, 4Mar, mar4, etc will all be interpreted as 4 Marc...

excell documents
when i double click on excell documents on my desktop nothing happens. instead, i must open excell first click on file then open its then that my documents opens. any idea on what might be causing this. makolomakwem@ananzi.co.za -- hunter Can you single click the excel document to highlight it from the desktop. If so, can you then select "Enter" to open the document. Does the double-click issue happen with any other items on the desktop? "hunter" wrote: > when i double click on excell documents on my desktop nothing happens. > instead, i must open excell first...

[HELP] Windows Event log File read???
Hello, I am having a bit a problem in getting information out of the windows system event log file. I know how to get information out of the backup file of the event file. //------------------------------------------------------ OpenBackupEventLog Opens a handle to a backup event log. OpenEventLog Opens a handle to an event log. ------------------------------------------------------// But I do not know how to get informaiton out of the original event file. (C:\WINNT\system32\config\SysEvent.Evt C:\WINNT\system32\config\SecEvent.Evt C:\WINNT\system32\config\AppEvent.Evt) I ha...

How do I activate sort in Excel?
I have worksheets set up in Excel. I am wanting to sort 1 column of these worksheets, but my sort button seems to be grayed out & I cannot select it. How do I activate the sort function again. Any ideas? Hi marygries Unprotect your sheet -- Regards Ron de Bruin http://www.rondebruin.nl "marygries" <marygries@discussions.microsoft.com> wrote in message news:A81E1842-3CF4-4CF5-85B3-ED01BEF943C7@microsoft.com... >I have worksheets set up in Excel. I am wanting to sort 1 column of these > worksheets, but my sort button seems to be grayed out & I cannot s...

Excel and Word Attachments Time Out in OWA
I am having an odd problem in OWA. Many end users are experiencing time out problems when trying to access Word or Excel attachments in OWA on Exchange 2003. It appears to be only Word or Excel as others work fine. OWA is being accessed on a front-end server. However, all attachments work fine when accessed through the back-end server. Any ideas? ...

Corrupt Excel Menu Bar
Somehow my excel menu bar became corrupted. I now have 7 "Edit" menus, 2 Format menus, and 2 Tools menus in my standard excel view. As a keyboard user (rather than a mouse user), this is killing my productivity. Any ideas? Help! Try this. Right-click your menu bar, select Customize, click the Toolbars tab, click the Reset button, click OK, click Close. That should reset your menu to normal. >-----Original Message----- >Somehow my excel menu bar became corrupted. I now have >7 "Edit" menus, 2 Format menus, and 2 Tools menus in my >standard excel ...

Can I make a Cladogram using microsoft Excel?
I'm using microsoft offfice 2003 and was curious is there anyway I can make a caldogram using the program? I know that it is possible to make a family tree; however this is inifficient in depicting ancestoral progression of the species- which would be better display with a cladogram. Any Help greatly appreciated! Hi, Maybe fernando cinquegrani's cluster or grafi examples may help. http://www.prodomosua.it/ppage02.html It should be possible to construct a chart using a xy-scatter and various charting tricks. But a lot depends on how you have this data stored. Cheers Andy La...

data-set too big for Excel
I am using Excel to extract data from a database, but when the extracted data is too extensive, Excel is stuck. Is there any way to expand the data-holding capacity of Excel? I am using Excel 2000. Any help would be appreciated. ...

Representing times in excel without dates
Excel experts I need your help!! I am using Office XP excel and am trying to represent time in the format: AM/PM without seconds. When I put in the time [I have the cell number format set to time/"1:30PM"/Locale is English (United States)], it comes up with the date preceding the time. I have tried varying settings of time but they all come up with the date. So if I try to put in 1:00PM it would represent this as a date and leave the rest of the time as 12am. I am doing a time sheet that subtracts the hours from between two times and then adds the differences up. I want it to ...

Stop excel icon showing at the bottom when opening spreadsheets
how can i stop the excel icons showing at the bottom when i open multiple spreadsheets. this can be annoying when you have other applications open also. Hi Rajesh, I assume you mean the Excel icons in the Windows taskbar. To prevent these from appearing go to Tools -> Options and on the View tab deselect the Windows in Taskbar checkbox. Michael "Rajesh" wrote: > how can i stop the excel icons showing at the bottom when i open multiple > spreadsheets. this can be annoying when you have other applications open also. > > ...

Need macro to allow me to go out into another excel file and copy and bring data back..
Hi, I'm looking to have a macro that I've started (below) to allow me to go out to a file that is always in the same location with the same name and copy information from it and bring it back into the file I was originally in. The file from which I want to get the information from is updated automatically every 24 hours from data dumped into it from our MRP system. The macro is to be stored in my "personal.xls" file. The problem is that the original file name is always different. So how can I make the macro come back to this file that has a different name each time to pas...

C++ problem
Hi, I need C++ code for Paste comand OpenClipboard GetClipboardData put it where you want it CloseClipboard If you have a more detailed question and useful context for answering it, a better answer can be given. joe On 14 Feb 2007 14:26:54 -0800, petra980@gmail.com wrote: >Hi, >I need C++ code for Paste comand Joseph M. Newcomer [MVP] email: newcomer@flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm Here is some C++ code for Paste comand http://www.codeproject.com/clipboard/archerclipboard1.asp AliR. <petra980@gmail.com> wrote in ...

Excel and clear cells....
Hi.... I have this large spreadsheet showing 52 weeks, and for each week 10 areas not adjacent to each other, all of wich I need to be cleared every year. In between areas needed to be cleared there are some hidden cells, rows and columns. Is there a way to easily clear these areas, without clearing hidden and locked areas? -- --- rgs Zadig Galbaras (nick) www.tresfjording.com You can highlight disjointed areas of cells using the Ctrl key while you click and drag. For example, click cell A1 and drag to cell B2 to highlight 4 cells. Now hold down the Ctrl key and click cell A8 and...

Importing xml Data into Excel 2002
It appears that there is a bug in Excel 2002 relating to importing xml files. If the xml file is empty for example: <?xml version="1.0"?> <SUA1500> </SUA1500> Excel 2002 will crash when trying to import this using Import Data, or New Web Query. However, if the file contains something inside these tags, like: <?xml version="1.0"?> <SUA1500> Something </SUA1500> Excel 2002 will not crash. I tried various combinations of this, and it appears that Excel crashes only if there is one empty tag. If there are other populated tags such as:...

Excel 2008 bug
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Open a blank sheet. <br><br>Enter a value with a dash in it - i.e., U1-1 <br><br>Excel will NOT allow you to set the series - it'll increment by 1 in the 'normal' direction and decrement by 1 in the 'reverse' direction. It will not allow you to set the series step whatsoever. <br><br>Oh the joy. Now I get to enter 256 fields by hand. Well, what isn't clear is what you would have it do instead or how you're attempting to get it to do otherwise. If...

How do you create a drop-down menu within a cell in Excel?
How do you create a drop-down menu within a cell in Excel? You can use data validation. There are instructions in Excel's Help, and here: http://www.contextures.com/xlDataVal01.html Jimmy wrote: > How do you create a drop-down menu within a cell in Excel? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Export to Excel with Expand/Collapse Feature
Hello, I work with Sqlserver 2005 and Reporting. I'm using a component Table to make a report. I use groups to collapse/expand rows. When I export to Excel the report, the expand/collapse is not export. I don't have the possibility to expand/collapse, it appears in expand version. What I need to configure? For example, if I use a component Matrix and I export to Excel, I can collapse/expand the rows in excel too. Thanks, Maria Submitted via EggHeadCafe - Software Developer Portal of Choice ASP.NET Cookies FAQ http://www.eggheadcafe.com/tutorials/aspnet/198ce25...