Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
12114:demo [2024/04/15 04:36 UTC] – [Customize the Addin Name and Description] mwolfe | 12114:demo [2024/04/15 17:05 UTC] – [Strongly-Typed Collection Class] mike | ||
---|---|---|---|
Line 28: | Line 28: | ||
===== Create the Tool Window Controls ===== | ===== Create the Tool Window Controls ===== | ||
+ | Next, we're going to customize the controls that appear on the tool window. | ||
- Open myToolWindow.tbcontrol | - Open myToolWindow.tbcontrol | ||
- Select all controls and delete them | - Select all controls and delete them | ||
+ | - Click DIAGNOSTICS error to go to myToolWindow.twin and **delete all dead code** | ||
- Select form and set the following properties: | - Select form and set the following properties: | ||
* Height: 1700 | * Height: 1700 | ||
Line 60: | Line 62: | ||
* Top: 1050 | * Top: 1050 | ||
* Width: 2250 | * Width: 2250 | ||
+ | - Create a version label | ||
+ | * Caption: Version {hhmm} | ||
===== Edit the Code in myToolWindow.twin ===== | ===== Edit the Code in myToolWindow.twin ===== | ||
Line 73: | Line 77: | ||
</ | </ | ||
- | ===== Build and Test the Addin on Same Machine | + | ===== Test the Updated |
- | The following instructions assume a machine with 32-bit Office (e.g., mjw20): | + | |
- | - Ensure "**win32**" is selected in dropdown | + | - Make sure Access is closed then **Build** the tB project |
- | - **File** > **Build** | + | - Reopen Access and switch to VBA |
- | * Creates and registers this file: '' | + | - Enter sample text '' |
- | * As part of registration, | + | |
- | * '' | + | ===== Strongly-Typed Collection Class ===== |
- | * Description: | + | Now, let's talk about what this add-in will actually, you know, //do//. |
- | * FriendlyName: | + | |
- | * LoadBehavior: | + | The purpose of the add-in is to encapsulate |
- | | + | |
- | * (Default): '' | + | I put a link to this article in the Resources page for today's presentation. If you've never heard of strongly-typed collection classes, I recommend you read up on them later. |
- | * '' | + | |
- | * (Default): '' | + | For our purposes, the important thing to know about them is that you CANNOT |
- | * '' | + | |
- | * (Default): '' | + | As you can imagine, manually jumping through those hoops is inefficient and error-prone. |
- | * '' | + | |
- | * (Default): | + | ===== Copy the VBA Code Into twinBASIC ===== |
- | * ThreadingModel: | + | |
- | * '' | + | |
- | * (Default): '' | + | - |
- | * DEBUG CONSOLE should show this: | + | |
- | * [LINKER] SUCCESS created output file ' | + | |
- | * [LINKER] | + | |
- | * [REGISTER] type-library registration completed. DllRegisterServer() returned OK | + | |
- | - Open Excel or Access | + | |
- | - Press [Alt] + [F11] to go to VBA IDE | + | |
- | - Tool window will likely be floating; click and drag to dock it somewhere: | + | |
- | | + | |
===== Build and Test the Addin on a Different Machine and Bitness ===== | ===== Build and Test the Addin on a Different Machine and Bitness ===== |