Jump to content

Why no Excel warning message?


terrypin
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

:)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...