#1   Report Post  
Posted to microsoft.public.excel.programming
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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default AddIn

Robin,

I'm not familiar with the previous thread, but an Addin is
basically just a workbook that is openned in the
background and kept hidden. The best way to create an
addin from a workbook and visa-versa is to change the
IsAddIn property of the workbook (Excel 97+). Do this from
the properties list in the VBE.

To get around your problem, I'd create a new workbook,
copy all the required code and worksheets into it and see
if it works.

Cheers,
Dave.

-----Original Message-----
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.
.

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


Dave Ramage was so kind as to respond (for which, many
thanks) :-

To get around your problem, I'd create a new workbook,
copy all the required code and worksheets into it and
see if it works.


...which is wot I dun... and it doesn't !

The nub is -

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


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


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
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
AddIn Robin Clay[_2_] Excel Programming 0 September 10th 03 11:36 AM
AddIn Robin Clay[_2_] Excel Programming 6 September 8th 03 11:08 AM


All times are GMT +1. The time now is 06:49 PM.

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

About Us

"It's about Microsoft Excel"