Jump to content
Sign in to follow this  
terrypin

Why no Excel warning message?

Recommended Posts

terrypin

This is one of my first scripts while learning some AutoIt basics:

#include <Excel.au3>
_ExcelBookOpen("C:\Docs\My Dropbox\FinishedWalks\WalkIndex.xls")

It opened the spreadsheet in Excel 2000, but I did not get the usual macro warning.

But how did it manage without adding a Send ("e") command? Excel security is set at Medium and the message always comes up if opened by manual mehods, such as by d-clicking WalkIndex.xls from XP Explorer. So I have to type 'e' (or click the Enable button) to proceed.

ExcelMacroWarning.jpg

--
Terry, East Grinstead, UK

Share this post


Link to post
Share on other sites
water

Looks like the default values for Excel 2000 are suppressing such warnings if COM is used.

But Excel 2000 is very, very old. Can't you upgrade to a more current version? Excel 2007 or later?

My rewrite of the Excel UDF allows to activate/deactivate such messages when connecting to Excel.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
terrypin

Thanks, appreciate the fast reply. At this rookie stage of my learning I'm not sure what COM is in this context, but that sounds a convincing sort of explanation.

I'm a bit more familiar with AutoHotkey. FWIW, using a similar AHK script did need the 'e' after launching the file.

I use Excel too little to make an upgrade worth it. Familiarity trumps in this case!

Terry, East Grinstead, UK

Share this post


Link to post
Share on other sites
water

Excel has an interface for the user: the GUI.

And another to directly access the objects (cells, worksheets, workbooks etc.) and methods to manipulate them (add, delete, copy ...) and properties to set different aspects of objects (color, font, size ...) by programs like AutoIt or AHK. This is called COM.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
terrypin

Thanks, water, understood.

--
Terry, East Grinstead, UK

Share this post


Link to post
Share on other sites
water

:)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×