• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Excel 4.0 Macro Functions

You are here: Home / Excel VBA / Excel 4.0 Macro Functions
excel 4 macro functions
October 26, 2017 by Philip Treacy

Before VBA there were XLM macros. VBA was introduced in Excel version 5, so these Excel macros are also known as Excel 4 macros.

Even though these XLM macros are quite old they still work in Excel 2016. To use them you call them like a regular function e.g. =GET.CELL(64,A1) but entering this into a cell will give you an error.

What you need to do is combine them with defined names and then you can do some cool stuff.

You can do things that might normally require writing VBA, so if you don't fancy doing any coding check these out. Listing files in a folder, highlighting cells containing formulas, or getting the background color (ColorIndex) of a cell. Once you know a cell's background color, you could then do math with cells of the same color like sum, average etc.

Note: the last link to Jan Karel Pieterse site has other examples too.

The trouble I had was that I couldn't easily find any reference to the Excel 4 macros. Because they were written for such an old version of Excel, the help file for the macros is no longer a supported format as of Windows 10.

Even if you did have a Windows 7 or 8 PC you'd have to download an executable file from Microsoft, install this, then update Windows to allow you to open the help file. I know because I built a Windows 7 virtual machine on Azure and did all of this. It was just too hard.

So I decided to put together this 653 page reference eBook. It basically contains the official Microsoft Excel 4 macro functions help file, but in a useful PDF format.

Free eBook - Excel 4 Macro Functions Reference

Excel 4 macro functions reference ebook

A complete reference for all Excel 4 macros including syntax and examples.

Enter your email address below to download this free PDF.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

Download the PDF.

You may not find all of these macros will be useful, but some certainly are.

This is provided for reference and if you are curious to see what you can do.

Don't go building mission critical models with these, support for them could be withdrawn in the future.

excel 4 macro functions

More Excel VBA Posts

Display All Matches from Search in Userform ListBox

Display All Matches from Search in Userform ListBox

Search a range for all partial and full matches of a string, and display matching records (entire rows) in a userform listbox. Sample code and userform.
animating excel charts

Animating Excel Charts

Use animation correctly to enhance the story your data is telling. Don't animate your chart just for some eye candy. Sample code and workbook to download.
dynamic data validation lists in userforms

Dynamic Data Validation Lists in Userforms

Data validation lists using the same source that are dynamically modified to prevent the same choice being made in each list.
show report filter pages for power pivot pivottables

Show Report Filter Pages for Power Pivot PivotTables

PivotTables created from Power Pivot can't use the 'Show Report Filter Pages' option. But this piece of VBA allows you to do just that.
charting real time data in excel

Charting Real Time Data in Excel

Receive data in real time and chart the data as it arrives. Can be used to chart things like stock prices or sensor readings. Sample code and workbook
select multiple items from drop down data validation list

Select Multiple Items from Drop Down (Data Validation) List

Choose multiple items from a data validation (drop down) list and store them all in the same cell. Sample workbook with working VBA.
Excel Calendar (Date Picker) to Use in Worksheets and Userforms

Multi-Language Excel Calendar (Date Picker) for Worksheets and Userforms

Easy to use, highly customizable and multi-language. This date picker is implemented as a userform that is simple to integrate into your workbook.
automating and emailing pivot table reports

Automating and Emailing Pivot Table Reports

Automate the creation and distribution of pivot table reports with some VBA. Send reports to multiple email recipients using Outlook.
search for data with userform

Searching for Data With a User Form

Search a list of records (like a table) using a user form, and then populate the fields of the search form when the record is found.
Checking values in range objects with vba

Checking Values in Range Objects With VBA

Use built in tools or your own code to examine the values contained within Range objects in VBA. Sample code to download.
Category: Excel VBA
Previous Post:Extract Date or Time from a Date and Time
Next Post:Excel PivotTable Percentage Change

Reader Interactions

Comments

  1. R

    May 7, 2022 at 4:34 pm

    Great job, thank you for the document.

    And some correctioins may be updated: Functions from E to G are duplicated.

    Reply
    • Philip Treacy

      May 10, 2022 at 10:38 am

      Thanks. I’ve updated the PDF and removed the duplicates.

      regards

      Phil

      Reply
  2. Jeff

    February 17, 2022 at 2:48 am

    Thank you so much for the refence PDF to the 4.0 macro language!
    I have one of the original paperback manuals, but when I’m away from my office, I can now use your Excel 4.0 Macro Functions Reference.pdf.

    We have a massive formatting macro that still uses that syntax & having that reference book is very helpful when having to go back and adjust syntax.

    Reply
    • Philip Treacy

      February 17, 2022 at 10:36 am

      You’re welcome Jeff, glad it was helpful.

      Regards

      Phil

      Reply
  3. Alan Elston

    December 19, 2020 at 3:06 am

    Hi
    I have just heard about these Excel 4 Macro things. It came about after using a VBA code line of the form, pseudo
    x = ExecuteExcel4Macro(“MATCH(something,FullClosedWorkbookReferrence,0)”)
    This was very useful for getting the row number in a closed workbook for something. ( That code line returns me in x , the position along the range given by FullClosedWorkbookReferrence of where it finds something

    I am having difficulty relating that to what you are talking about. I can’t even find the MATCH function in your Excel 4 Macro Functions Reference.

    Alan

    Reply
    • Philip Treacy

      December 19, 2020 at 1:55 pm

      Hi Alan,

      MATCH is a modern function so I’d use the modern version rather than any old XL4 implementation.

      Regards

      Phil

      Reply
      • Alan Elston

        December 20, 2020 at 6:51 pm

        I have been using simple formulas, such as Match with closed workbook references in them as an efficient way to get information out of closed workbooks for a few years. Sometime the performance is much better than the most advanced data retrieval techniques. Because in VBA the Evaluate function does not work with closed workbook references, automating this technique with VBA means putting a formula into a cell, then converting it to a value , then taking the value in. Its still quite good. Match is one formula which can be used like this
        Stumbling on a code line like I mentioned was quite exciting, since it comes close to working as Evaluate would if it could work with closed workbook references.
        So I wanted to get a bit more clued up on Excel 4.0 Macro Functions to see what other jems are to find.
        I can’t follow so easily yet any of the Blogs on using them .
        I will keep looking.
        Thanks for the reply, Phil, stay safe and healthy.
        Alan

        Reply
        • Philip Treacy

          December 21, 2020 at 9:54 am

          Hi Alan,

          You could consider using Power Query to get data from closed workbooks.

          Regards

          Phil

          Reply
          • Alan Elston

            December 21, 2020 at 8:55 pm

            Hi Phil
            Sql / ADO and co. things work as well. Good on Text files and .xls Excel files. Slow on .xlsm .xlsx and .xlsb files
            But all too slow for me
            Power Query is on my list of things to get around to learn. But I need a solution that can be incorporated into other VBA coding. So I doubt it would be any good, but that’s just a guess. – Cant imagine it could come close to the performance I have.

            I think there could be some potential in this ExecuteExcel4Macro( with MATCH ) and maybe who knows what else. ***

            Along with a lot of other things, I compared some time ago the well known ExecuteExcel4Macro( with closed workbook path ) way of doing it. But that was strangely orders of magnitude slower than the way I do it for a larger range.

            ***I did just try both ExecuteExcel4Macro( with INDEX ) and ExecuteExcel4Macro( with INDEX with MATCH ) and its working on closed workbooks. This is exciting. I must find time to investigate fully and compare with my other ways…

            Happy Holidays, stay safe.
            Alan

          • Philip Treacy

            December 23, 2020 at 9:11 am

            Hi Alan,

            PowerShell may offer you some tools to do what you want. I know you can manipulate Excel files with it but I have never used it.

            Regards

            Phil

  4. Charles

    July 31, 2020 at 6:10 pm

    I love the exercise. Great insight and will make me more productive

    Reply
    • Philip Treacy

      August 1, 2020 at 2:24 pm

      Thanks, glad it was helpful

      Reply
  5. mey

    February 15, 2020 at 2:27 pm

    ExecuteExcel4Macro (“GET.WORKSPACE(10)”) how does this work in VBA macro?

    Reply
    • Philip Treacy

      February 15, 2020 at 3:22 pm

      Hi,

      Not sure what you mean by ‘how does it work in VBA macro’?

      To use XL4 macros define a name -as explained in this article.

      What GET.WORKSPACE does is to return information about the workspace. WORKSPACE(10) gives you a number indicating special modes of Excel.

      Phil

      Reply
  6. Jerry Harper

    February 16, 2019 at 11:55 am

    FYI,

    For years, starting about 2006, I have been using CellHasFormula to shade all cells with formula and all blank cells in a large workbook. I am running on a Win10 1809 latest version PC. November 21, 2018 I switched to from MS Office 2016 Pro Plus to MS Office 2019 Pro Plus. No issues with existing workbooks. On 2/1/2019 this was upgraded to Office 2019 to Version 1901 (build 11231.20130 Click-to-run). About that time I started having problem with a large XLSM workbook. It would not open unless I used Open-repair every time. I repaired ExceI, reloaded Win 10, version 17763.292, killed all excel add-ins … I tried everything and nothing helped, but open- repair. Today I believe I finally found a solution. Apparently Excel 2019 does not like Excel 04 functions. As a last resort today I tried to convert the XLSM file to XLSX file and got the error message about having an Excel 04 as a named function. The first helpful error message in nearly 2 weeks. After deleting the CellHasFormula =Get:CELL(48,INDIRECT(“rc”,FALSE)) named function with name manager I was able to save the file as XLSL. Now Excel appears to be working correctly. I have converted 20+ worksheets in the workbook to use conditional formatting with =isformula, and =isblank, to identify cells with formula and blank cells. Hopefully this is the fix. Time will tell.

    Jerry Harper

    Reply
    • Philip Treacy

      February 18, 2019 at 12:07 pm

      Thanks Jerry, interesting t hear that perhaps finally the old XL4 macros aren’t supported.

      Reply
  7. Juan

    February 7, 2019 at 4:28 am

    Very useful. Thank you.

    Reply
    • Philip Treacy

      February 7, 2019 at 7:14 am

      Thx Juan

      Reply
  8. Ron

    October 18, 2018 at 10:41 pm

    Perfect thanks

    Reply
    • Philip Treacy

      October 19, 2018 at 8:33 am

      no worries

      Reply
  9. Shuiping

    July 11, 2018 at 12:30 am

    Great, this is what I really need. Thanks.

    Reply
    • Philip Treacy

      July 13, 2018 at 9:21 am

      No worries

      Reply
  10. Christoher Perry

    June 12, 2018 at 12:26 am

    thanks

    Reply
  11. Janusz Dorożyński

    March 18, 2018 at 6:43 pm

    Phil, I amso happy that in our world there are such wonderful guys like you who do not hesitate to share their very valuable works that require great effort and time. Many thanks.

    Reply
    • Philip Treacy

      March 19, 2018 at 12:55 pm

      Thanks Janusz, glad to help 🙂

      Reply
  12. Pim Lajuaeioua

    February 17, 2018 at 4:55 am

    Great!

    Reply
  13. MONVILLE

    February 12, 2018 at 5:55 am

    I was looking for such a document for eons…
    Actually it’s a bit late but as I have still Excel 4 programs, I am happy to have it
    Thank you very much.
    Jean MONVILLE

    Reply
    • Philip Treacy

      February 12, 2018 at 8:56 am

      You’re welcome Jean.

      Regards

      Phil

      Reply
  14. Javid

    January 10, 2018 at 4:10 am

    Cool! I found something I was looking for an hour!

    Reply
  15. Meni Porat

    November 14, 2017 at 7:26 am

    Amazing.
    The huge amount of time invested in this comprehensive, easy-to-use manual should be highly appreciated.

    Well done, Philip.

    Thanks a lot.

    Reply
    • Philip Treacy

      November 14, 2017 at 8:38 am

      Thanks Meni.

      Reply
  16. Chuck

    October 28, 2017 at 2:09 am

    Thank you Phil for providing us such a document!

    Best regards,

    Chuck

    Reply
    • Philip Treacy

      October 28, 2017 at 8:15 am

      You’re welcome.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Shopping Cart

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now
  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
 
  • About My Online Training Hub
  • Contact
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Copyright © 2023 · My Online Training Hub · All Rights Reserved

Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.

Download A Free Copy of 100 Excel Tips & Tricks

excel tips and tricks ebook

We respect your privacy. We won’t spam you.

x