In the VBA Editor while looking at the macro...
Go to Tools > References. This opens the References dialog
In the References dialog, find Microsoft Forms 2.0 Object Library and put a tick beside it and press OK
If the References dialog doesn't show Microsoft Forms x.x Object Library, click the Browse... button and an Add Reference dialog appears (with the System32 folder open).
Find the FM20.dll file and select it and click the Open button. This returns you to the References dialog and you should now see the object library in the list and it will be ticked.
Click the OK button to close the References dialog.
Go to Debug > Compile Project and you should now see that line in your code is now accepted
IF any of the menu commands are greyed out, click the Reset (square) button on the toolbar to stop the macro - when a macro is paused, some of the menu commands are not available.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|