Thread: AddIn
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robin Clay[_2_] Robin Clay[_2_] is offline
external usenet poster
 
Posts: 14
Default AddIn

Greetings !

A continuation of a saga that started on 1st September,
and has elicited responses from several people, for whose
contribution I am very grateful. Alas ! The problem
remains...


I had a worksheet with some modules of code that I wanted
to use in other spreadsheets, as a "library" of functions.

It was suggested that I "save it as a .xla file", so when
I did "Save As..." I changed the extension to .xla, thus
producing a "pseudo AddIn", which, although it has worked
for the past nine months or so, still generates problems.
I have therefore tried to separate the "worksheet" part
from the "AddIn" part, saved by selecting the "AddIn"
option in the "Save As..." svreen - but the combination
now will not run.

I posted on 1st Sept, but that post and its replies are
now "lost in the mists of history", so I thought I would
try again, having followed advice. This is a "follow up".

Tom Ogilvy responded, 9/2/2003 11:10:39 AM

Rob Bovey's URL:


So I have now managed to run that. Alas ! It makes no
difference to the problem in hand, my code still refuses
to run.

I would also make my addin a workbook,


Please tell me how I do that?
There is no option to "Save As..." in VBE.

This seems to be going backwards ! My whole aim is to
convert a workbook to an AddIn + workbook.

then make it the active project (in
the vbe) and then go to tools=References
(in the vbe) and make sure nothing
is shown as missing.


At the moment, the code (that all used to run OK, when it
was in a psuedo .xla) now does not recognise the Common
Variables that I have declared in the new "genuine" .xla,
using these lines, and a lot more similar -

Public I0(20) As Double
Public Direction(3) As String
Public G1(32) As String * 8
Public Stxt$(10)
Public Ttxt$(5)

When it runs, it comes to a halt, believing that
Ttxt$(3)
is a Function Call

Taking the original "psuedo" .xla, I tried to separate
the "Worksheet" part from the "true" .xla part, but this
has meant that I have duplicated some of the code, in
the "ThisWorkbook" module, specifically, the
Workbook_BeforeClose procedure. I can't see that this
should have the effect at start up that I am
experiencing?

I have tried putting the Common Variables module in the
workbook, but made no difference.