#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default AddIn

I wrote in here, 2003-09-01 08:15:31 PST

I am now trying to separate the "Worksheet"
part from the "AddIn" part.


O.K. - so here is my current challenge !


In the AddIn part, I have modules -
"Constants", "CommonVariables", "VariableTypes"
and "PublicDeclarations", but when I RUN the
two parts together, i.e. when I load the
spreadsheet, Excel runs OK until it reaches
RecLen = Len(HIP(Ali, 1))


and Excel highlights the word "HIP" (it appears to be
in "de-bug" mode, while loading the AddIn)

which refers to an array variable declared
in the "CommonVariables" module by
Public HIP(2, 50) As HorizIntersPts


At this point, Excel creaks to a halt with the message -
"Compile Error - Sub or Function not defined".


Now, this worked FINE until I split the two parts.


What am I doing wrong ?


Tom Ogilvy was (once again) kind enough to respond, 2003-
09-01 08:37:44 PST, for which, many thanks.

I suspect Excel does not have a definition for
HorizIntersPts


I have the lines -

Public Type HorizIntersPts
PtNo As Integer
Rad As Double
Code As String
Cant As Double
End Type

in the "VariableTypes" Module of the AddIn.
It all used to work "before"...
It seems that Excel simply does not reach those lines
early enough ?


When I try to exit, Excel again grinds to a halt at the
same place, and then it stops again in the "BeforeClose"
routine of the AddIn, at this line (when I want the
question "Save this file?" asked -

Ans$ = MsgBox(Msg, vbQuestion + vbYesNoCancel)

Excel highlights the word Ans$ with the message

Compile error
Variable not defined

This, despite my having this line -
Public Ans$
in the "CommonVariables" Module of the AddIn.


Curiously, these are the only two places it seems to have
a problem, yet there are lots of similar situations /
variables....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default AddIn

Do you have Rob Bovey's Code Cleaner? I suggest you run it. Search Google for a URL to download
it. If you can't find it, export all modules to text files, perhaps save, close and reopen the
workbook, then import the modules. (Rob's Add-in does that automatically.)


On Tue, 2 Sep 2003 02:07:32 -0700, "Robin Clay" wrote:

I wrote in here, 2003-09-01 08:15:31 PST

I am now trying to separate the "Worksheet"
part from the "AddIn" part.


O.K. - so here is my current challenge !


In the AddIn part, I have modules -
"Constants", "CommonVariables", "VariableTypes"
and "PublicDeclarations", but when I RUN the
two parts together, i.e. when I load the
spreadsheet, Excel runs OK until it reaches
RecLen = Len(HIP(Ali, 1))


and Excel highlights the word "HIP" (it appears to be
in "de-bug" mode, while loading the AddIn)

which refers to an array variable declared
in the "CommonVariables" module by
Public HIP(2, 50) As HorizIntersPts


At this point, Excel creaks to a halt with the message -
"Compile Error - Sub or Function not defined".


Now, this worked FINE until I split the two parts.


What am I doing wrong ?


Tom Ogilvy was (once again) kind enough to respond, 2003-
09-01 08:37:44 PST, for which, many thanks.

I suspect Excel does not have a definition for
HorizIntersPts


I have the lines -

Public Type HorizIntersPts
PtNo As Integer
Rad As Double
Code As String
Cant As Double
End Type

in the "VariableTypes" Module of the AddIn.
It all used to work "before"...
It seems that Excel simply does not reach those lines
early enough ?


When I try to exit, Excel again grinds to a halt at the
same place, and then it stops again in the "BeforeClose"
routine of the AddIn, at this line (when I want the
question "Save this file?" asked -

Ans$ = MsgBox(Msg, vbQuestion + vbYesNoCancel)

Excel highlights the word Ans$ with the message

Compile error
Variable not defined

This, despite my having this line -
Public Ans$
in the "CommonVariables" Module of the AddIn.


Curiously, these are the only two places it seems to have
a problem, yet there are lots of similar situations /
variables....


Reply
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
AddIn Excel2007 William Wolfe[_2_] Excel Discussion (Misc queries) 0 February 2nd 10 08:28 PM
How to close an Addin? FARAZ QURESHI Excel Discussion (Misc queries) 5 June 4th 09 01:15 PM
MS VB addin err DL Excel Worksheet Functions 0 May 15th 07 05:22 PM
Addin Help alexm999 Excel Discussion (Misc queries) 4 July 25th 06 08:27 PM
Addin Password Adept Excel Discussion (Misc queries) 1 March 9th 06 10:22 PM


All times are GMT +1. The time now is 02:35 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"