Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
172to176
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
172to176
172to176
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Add In

Add In
28.10.2002 11:53:22
Micha
ich kapiers nicht.

wenn ich eine Datei mit xla abspeicher kann ich das Makro nicht finden.
Wie weise ich das Makro einem Benutzerdefinierten Button zu.
bzw wie funzt das bei Eurotool.xla?

10
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
Re: Add In
28.10.2002 11:57:27
Bernd
Hallo Micha,

anbei zwei Texte von MS (leider in Englisch), die auch für's Excel 2000 gelten (hab es schon probiert.)

Gruß

bernd

How to Create an Add-in File in Microsoft Excel 97

In Microsoft Excel 97, the process you use to create an add-in file is different than the process for earlier versions of Microsoft Excel. This article contains detailed information about how to create an add-in (.xla) file in Microsoft Excel 97.

MORE INFORMATION
================

Add-in File Behavior
--------------------

An add-in file in Microsoft Excel is a special type of workbook. An add-in file can contain worksheets, chart sheets, and Visual Basic for Application macros and functions. Macros and functions in an add-in file add optional commands and features to Microsoft Excel without allowing a user to
directly view or edit them.

Unlike normal workbooks, when you open an add-in file, it is not visible on the screen, and you cannot unhide it by clicking Unhide on the Window menu. An add-in file is displayed in the Project Explorer window in the Visual Basic Editor. However, you cannot view or edit an add-in file if it is
protected with a password.

Creating an Add-in File
-----------------------

To create an add-in file in Microsoft Excel 97, use the following two-part process:

- Protect the projects in the workbook to prevent them from being viewed or edited after you create the
add-in file.

- Save the workbook as an add-in file.

Protecting the projects is very important in Microsoft Excel 97. In earlier versions of Microsoft Excel, it is not necessary to protect the contents of an add-in file. However, in Microsoft Excel 97, if you do not protect projects in the workbook, others can view and/or edit the sheets and Visual Basic modules in the add-in file.


Protecting the Projects in the Workbook:

1. In Microsoft Excel, activate the workbook you want to convert to an add-in file.

2. On the Tools menu, point to Macro, and click Visual Basic Editor.

3. In the Project Explorer window in the Visual Basic Editor, click the following bold entry:

()

where is the name of the Visual Basic project, and is the name of the
workbook you want to convert.

The entry will be similar to the following example:

VBAProject (Mybook.xls)

4. On the Tools menu, click Properties.

5. Click the Protection tab.

6. Select (check) the "Lock project for viewing" check box. Type a password in the Password box.
Type the same password in the "Confirm password" box, and click OK.

Saving the Workbook as an Add-in File:

1. Close the Visual Basic Editor by clicking "Close and Return to Microsoft Excel" on the File menu.

2. On the File menu, click Properties.

3. In the Properties dialog box click the Summary tab.

4. In the Title field, enter any name for your add-in. The name you provide will be the name that
appears in the Add-Ins dialog box.

5. In the Comments field, enter any text that describes your add-in. This description will be displayed in
the Add-Ins dialog box when you select your Add-In in the List of available add-ins.

6. Click OK to close the Properties dialog box.

7. On the File menu, click Save As.

8. In the Save As dialog box, select "Microsoft Excel Add-In(*.xla)" in the Save As Type box. If you
want, change the file name and click Save.

When you click Save, Microsoft Excel creates the add-in.

9. On the File menu, click Close.

After you create the add-in file, you can open the add-in file the same way you open any workbook. If the add-in file contains an Auto_Open macro, the macro runs and performs any actions for which it is programmed. Any functions and subroutines in the add-in file are available for use in
Microsoft Excel.


2ter Artikel

How to Convert an Add-in File into a Workbook

In Microsoft Excel 97, you can convert an add-in (.xla) file into a normal workbook (.xls) file that you can view and edit. This article contains detailed information about converting an add-in file.


To convert an add-in file back into a normal workbook, use the following steps:

1. On the File menu, click Open. In the Open dialog box, select the add-in file that you want to convert (for example, Test.xla), and click Open.

2. On the Tools menu, point to Macro, and then click Visual Basic Editor (or press ALT+F11).

In the Project Explorer window in the Visual Basic Editor, entries similar to the following appear:

()

where is the name of the Visual Basic project, and is the name of an add-in file.

For example, entries similar to the following appear:

MyAddIn (Test)

3. Click the plus sign (+) to the left of the entry for the add-in file.

4. If you are prompted for a password, type the password and click OK. Otherwise, skip to step 5.

NOTE: if you do not know the password for the add-in file, you cannot convert it into a normal workbook. If you know who created the add-in file, ask the creator for the password. Otherwise, you cannot continue.

Entries similar to the following appear in the Project Explorer window:

MyAddIn (Test)
Microsoft Excel Objects
Modules

5. Click the plus sign (+) to the left of "Microsoft Excel Objects".

The tree should look similar to the following:

MyAddIn (Test)
Microsoft Excel Objects
Sheet1 (Sheet1)
Sheet2 (Sheet2)
Sheet3 (Sheet3)
ThisWorkbook
Modules

6. Click ThisWorkbook.

7. On the Tools menu, click Properties.

8. Click the Protection tab. Clear (uncheck) the "Lock project for viewing" check box. Clear both the Password and "Confirm password" boxes. Then, click OK.

9. In the Properties window of the Visual Basic Editor, click IsAddin. In the box to the right of IsAddin, change the value from True to False.

10. On the File menu, click "Close and Return to Microsoft Excel".

The worksheets and chart sheets in the add-in file (if it contains any) should be visible.

11. On the File menu, click Save As.

12. In the Save As dialog box, click "Microsoft Excel Workbook" in the "Save as type" box. Type a new name for the workbook (for example, Test.xls) in the file name box. Click Save to save the add-in file as a normal workbook.

13. After you save the workbook, click Close on the File menu.

The add-file is converted to a workbook that can be opened, viewed, modified, and saved, just like any other workbook. Note that the add-in file is not modified by this process.

Text 2:

XL97: How to Convert an Add-in File into a Workbook
--------------------------------------------------------------------
The information in this article applies to:

- Microsoft Excel 97 for Windows
--------------------------------------------------------------------

SUMMARY
=======

In Microsoft Excel 97, you can convert an add-in (.xla) file into a normal
workbook (.xls) file that you can view and edit. This article contains
detailed information about converting an add-in file.

MORE INFORMATION
================

To convert an add-in file back into a normal workbook, use the following
steps:

1. On the File menu, click Open. In the Open dialog box, select the
add-in file that you want to convert (for example, Test.xla), and
click Open.

2. On the Tools menu, point to Macro, and then click Visual Basic Editor
(or press ALT+F11).

In the Project Explorer window in the Visual Basic Editor, entries
similar to the following appear:

()

where is the name of the Visual Basic project, and in file name> is the name of an add-in file.

For example, entries similar to the following appear:

MyAddIn (Test)

3. Click the plus sign (+) to the left of the entry for the add-in file.

4. If you are prompted for a password, type the password and click OK.
Otherwise, skip to step 5.

NOTE: if you do not know the password for the add-in file, you cannot
convert it into a normal workbook. If you know who created the add-in
file, ask the creator for the password. Otherwise, you cannot continue.

Entries similar to the following appear in the Project Explorer window:

MyAddIn (Test)
Microsoft Excel Objects
Modules

5. Click the plus sign (+) to the left of "Microsoft Excel Objects".

The tree should look similar to the following:

MyAddIn (Test)
Microsoft Excel Objects
Sheet1 (Sheet1)
Sheet2 (Sheet2)
Sheet3 (Sheet3)
ThisWorkbook
Modules

6. Click ThisWorkbook.

7. On the Tools menu, click Properties.

8. Click the Protection tab. Clear (uncheck) the "Lock project for
viewing" check box. Clear both the Password and "Confirm password"
boxes. Then, click OK.

9. In the Properties window of the Visual Basic Editor, click IsAddin. In
the box to the right of IsAddin, change the value from True to False.

10. On the File menu, click "Close and Return to Microsoft Excel".

The worksheets and chart sheets in the add-in file (if it contains any)
should be visible.

11. On the File menu, click Save As.

12. In the Save As dialog box, click "Microsoft Excel Workbook" in the
"Save as type" box. Type a new name for the workbook (for example,
Test.xls) in the file name box. Click Save to save the add-in file as a
normal workbook.

13. After you save the workbook, click Close on the File menu.

The add-file is converted to a workbook that can be opened, viewed,
modified, and saved, just like any other workbook. Note that the add-in
file is not modified by this process.

Anzeige
Re: Add In funzt immer noch nicht
28.10.2002 13:08:27
Micha
Hallo Bernd

danke für deine antwort.

Leider kann ich damit nicht viel anfangen.
als xla abspeichern war nicht das Problem. Sonder wie kann ich die xla Datei nehemen einen Button in der symbolleiste kreiren und diesen button mit der xla datei verbinden. Die personl.xls will ich nicht nehmen.

Re: Add In funzt immer noch nicht
28.10.2002 13:28:59
bernd
Hallo Micha,

normalerweise geht das dann über den Add-In Manager.

Also EXTRAS - ADD-IN Manager - Durchsuchen

das wars.

Gruß

Bernd

Re: Add In funzt immer noch nicht
28.10.2002 14:34:47
Micha
Bernd

hab ich probiert
funzt nicht

die meldung lautet

kein gültiges Add -inn


Was nun???

Re: Add In funzt immer noch nicht
28.10.2002 15:23:00
Bernd
Hallo Micha,

hast Du die Excel Arbeitsmappe noch irgendwo als XLS-Datei?

Wenn ja, dann generiere das xla bitte mal nach der Anleitung, nur zum Testen, ob Dein xla auch wirklich eins ist. Habe die Procedure auch ein paar mal machen müssen, bis es dann mal gefunkt hatte.

Wnn Du diese nicht mehr hast, kannst Du Dein xla wieder in eine xls-Datei umwandeln. (Anleitung siehe oben).

Gruß
Bernd

Anzeige
Re: Add In funzt immer noch nicht
28.10.2002 15:31:01
micha
Hallo Bernd

hab ich alles mehrfach gemacht.
Die Datei ist noch als xls vorhanden.

es funzt einfach nicht *verzweifel

Re: Add In funzt immer noch nicht
28.10.2002 17:39:41
Bernd
Hallo Micha,

kann es sein, daß Du einfach nur ein oder mehrere Makros nach dem Prinzip

sub makro1()
'macht irgend was
end sub

sub makro2()
'macht auch etwas
end sub

etc.

hast?

Wenn ja, dann generiere Dir per 'sub auto_open()' ein Menü-punkt, mit Untermenüs, die die Makros dann aktivieren. Erst dann das ADD-In erstellen.

Ich glaube hier liegt Dein Problem.

Beispiele findest Du mit Sicherheit hier unter Beispilen oder über die Recherche.

Vielleicht hilft es.

Gruß

Bernd

Anzeige
Re: Add In funzt immer noch nicht
29.10.2002 12:16:36
Hans W. Hofmann
Hm, wenn eine XL-Datei als xla mit dem Dateityp Addin gespeichert wird, dann ist es ein Addin. Was gibt es da falsch zu machen?

Bindet man das Addin *.xla über den Addin-Manager ein, so kann man bei Kenntnis der Sub bzw. Function Namen die Methoden des Addin auch verwenden. Dass Sie nicht als Makro angezeigt werden ist vernüftig, weil man sonst die Übersicht verlieren würden. Dazu ist sichließlich der Objektkatalog da.

Via VBA erreicht man die Methoden durch
Application.Run "Name_der_Sub_Function"
Dazu ist prinzipiell kein Autostart-Makro notwendig, es sein den es müssen irgend welche Bibliotheken eingebunden werden.
HTH

Gruß HW

Anzeige
Re: Add In funzt jetzt
29.10.2002 12:29:50
Micha
Hallo Bernd,


danke für deine Tips auch allen anderen ein Dankeschön


Micha

Re: Add In funzt immer noch nicht
29.10.2002 13:43:05
Bernd
Hallo Hans,

danke für die Info, aber ich bin nicht davon ausgegangen, daß ich ein neues Makro erstellen muß, um das was ich in dem ADD-In definiert habe, aufzurufen. Aus diesem Grund war mein Ansatz ein auto_open Makro, das eine Schaltfläche oder ähnliches generiert (so wollte es Micha auch, wenn ich mich nicht irre) über die ich dann die entsprechenden subs aufrufen kann.

Viele Wege führen halt nach ROM :-))

Gruß

Bernd

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige