LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
3 3 is offline
external usenet poster
 
Posts: 1
Default Enabling add-in causes excel to crash

I am using Excel 2007...and saving everything as Office Excel 97-2003
Worksheet. I created an Excel 97-2003 Add-in called CompFxnsAddIn.xla
which contains the code at the bottom of this post.

The code seems to work fine...giving me the expected values, etc (they
are intended to be used on a timeseries in a single column). Anyway,
now everytime I open the file, I get the following notification:
"Excel experienced a serious problem with the CompFxnsAddIn add-in. If
you have seen this message mutiple times you should disable this add-
in and check to see if an update is available. Do you want to disable
this add-in?"

If I click no, Excel crashes. If I click yes, Excel loads. But then
when I go into Excel options/Add-Ins and check the compfxnsaddin box,
Excel crashes.

The only way I was able to get it to load was to enable/install Solver
Add-In and then afterwards it allowed me to enable my add-in.
However, next time I opened the file even disabling and re-enabling
Solver Add-In failed to work. I had to load something else new
(Conditional Sum Wizard) at the same time. Obviously I'm going to run
out of new add-ins to load very soon, but I don't understand what is
happening. I don't believe it has anything to do with the VBA
code....but I posted it just in case.

I was unable to google any other mention of something that seemed
relevant to this....but I am quickly getting fed up with the 20 minute
delays each time I want to get in the file.

Any help???? Please.....

Oh....and I'm running Windows XP.

-------------CompFxnsAddIn.xla
code---------------------------------------

Public Function HigherThanB4(cell As Range, ByVal rowsback As Integer)
As Integer
Dim d1 As Double
Dim d2 As Double

d1 = cell
d2 = cell.Offset(-rowsback)

Select Case d1 d2
Case True
HigherThanB4 = 1
Case False
HigherThanB4 = 0
End Select
End Function

Public Function LowerThanB4(cell As Range, ByVal rowsback As Integer)
As Integer
Dim d1 As Double
Dim d2 As Double

d1 = cell
d2 = cell.Offset(-rowsback)

Select Case d1 < d2
Case True
LowerThanB4 = 1
Case False
LowerThanB4 = 0
End Select
End Function

Public Function HigherThanMA(cell As Range, ByVal MAperiod As Integer)
As Integer
d1 = cell
d2 = WorksheetFunction.Average(Range(cell, cell.Offset(-MAperiod +
1, 0)))

Select Case d1 d2
Case True
HigherThanMA = 1
Case False
HigherThanMA = 0
End Select
End Function

Public Function LowerThanMA(cell As Range, ByVal MAperiod As Integer)
As Integer
d1 = cell
d2 = WorksheetFunction.Average(Range(cell, cell.Offset(-MAperiod +
1, 0)))

Select Case d1 < d2
Case True
LowerThanMA = 1
Case False
LowerThanMA = 0
End Select
End Function
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enabling macros in Excel 2007 Harry G Excel Programming 6 August 22nd 08 03:40 PM
Excel 2007 enabling macros Johan U Excel Discussion (Misc queries) 3 September 20th 07 07:12 PM
Excel 2007 Enabling Macros Ang Excel Discussion (Misc queries) 3 May 17th 07 09:59 AM
enabling xml on excel vojo Excel Discussion (Misc queries) 1 November 15th 06 08:38 PM
Enabling Arabic numerals in Excel orpheus Excel Discussion (Misc queries) 6 September 7th 05 10:37 AM


All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"