1 Attachment(s)
Test Excel macros , XLM , (Excel 4 Macros)
Testing and notes in preparation for possible blog on
Excel macros , XLM , (Excel 4 Macros)
Excel macros , XLM , (Excel 4 Macros)
Introduction
.
The vagueness of Excel macros , XLM , (Excel 4 Macros)
Before Visual Basic for Applications, VBA, there were Excel macros, XLM.
The concept of XLM is very different from Visual Basic for Applications (VBA) macros.
VBA was introduced in Excel version 5.0 so these older macros are also known as Excel 4 Macros.
We basically have a lot of single commands, the execution of which does something. The actual way that you can use them seems to be a bit vague. Possibly this is because they have been continued to be supported in newer Office versions and can be used in various ways. It’s not too clear how these ways relate to the original way that they were used before Visual Basic for Applications.
The help information has been continually withdrawn, and it’s possible that the very latest versions of Office my not support them anymore.
So there may be a conscious or unconscious policy to confuse the issue.
There are ways to use an individual command, ( an individual Excel macro ), or a sequential list of them. Typically a list of them would be held in a file looking something with a modern spreadsheet but having the extension .xlm
In many cases the commands do something and / or return something, so they could be thought of as methods or functions.
Often a list of the possible commands would be referred to as a list of excel 4.0 macro functions.
Nobody is sure anymore of what all the possible commands / excel 4.0 macro functions are, or if they all still work, so there is no comprehensive list
Working on closed workbooks
What first interested me in these old Excel macros , XLM , (Excel 4 Macros) things was seeing that they come close to doing sometimes something like the VBA Evaluate function working with a closed workbook reference. The VBA Evaluate function won’t work with a closed workbook reference, which always annoyed me.
http://www.eileenslounge.com/viewtopic.php?f=30&t=25213
https://eileenslounge.com/viewtopic.php?f=30&t=34952
https://www.excelforum.com/excel-pro...ml#post5363303
Single value limitation, non array characteristic
One limitation worth pointing out an early stage to avoid possible over excited over possibilities with Excel macros , XLM , (Excel 4 Macros), is that typical commands/functions that return something will unlikely return anything other than a single value
Using Excel macros , XLM , (Excel 4 Macros)
General: In a Cell or Cells
Nobody can remember exactly how Excel macros , XLM , (Excel 4 Macros), were ever used, but approximately they seem to have been used like a modern Excel function, so like
=TheExcel4MacroCommandFunctionThing
But typing one of the old XLM commands/functions in a cell like that doesn’t seem to work in a modern Excel spreadsheet cell. In fact it would likely give you an error: A modern Excel wont recognise the thing as a name or function.
There seems to be a mixture of ways to get things working… , and a couple of things help us often, couple of general observations:
_(i) The common factor in getting the macro commands to run seems to be somehow referring to them. We often see this in Excel and VBA: We sometime talk about “exposing the interface…” : We find in Excel and VBA that sometimes a thing springs into life, or gets done if we are :
refer to a thing;
or
refer to where a thing is at;
or
using/calling its name.
For us, the thing of interest is named ranges. We will consider this in more detail later
_ As part of the compatibility measures present in newer Excel versions, we may add a macro sheet, a “4.0 Macro sheet in a Microsoft Excel” : this may be done via shortcut keys, Ctrl+F11 or from menus after right clicking on a worksheet tab, as in this screenshot
InsertMaco2Sheet.JPG : http://i.imgur.com/JtaUKCQ.jpg
Attachment 3468
https://i.imgur.com/JtaUKCQ.jpg
We can type our commands, like =TheExcel4MacroCommandFunctionThing in this macro worksheet, and it wont error. We will discuss how we can then use these commands in such a worksheet in detail later
Ref
https://exceloffthegrid.com/using-ex.../#comment-9200
https://www.excelforum.com/excel-pro...ml#post4440076
https://www.youtube.com/watch?v=b1S4UJsL62w
https://www.youtube.com/watch?v=TpV__z0iZmo
https://www.mrexcel.com/board/thread...11/#post-95601
https://www.mrexcel.com/board/thread...2#post-5210188
Old Excel 4 Macros help File
Old Excel 4 Macros help File
I found a Folder in an old computer
Normal Share ‘FoundMacro4Stuff’ https://app.box.com/s/5g8b5kh62jcxi4rb6niv8h90lh72gt5d
and
zip Share ‘FoundMacro4Stuff.zip’ https://app.box.com/s/jvh0q4jzx0a83r7yiryhs16sa2iq09l3
form
It has a few things in it http://i.imgur.com/9Br7Lb7.jpg
macrofun.exe
BOOTEX.LOG
Readme.txt
Macrofun.cnt
One of the files is some sort of Cabinet exe thing
http://i.imgur.com/rjq7QoL.jpg http://i.imgur.com/65NUgQO.jpg
Share ‘macrofun.exe’ -
Further examination of the exe file tells you its some sort of Win32 Cabinet Self-Extractor
http://i.imgur.com/AhwC8ok.jpg
I don’t know what that is, but if I double click on it I go through some sort of setting up / installing or similar process set of windows
http://i.imgur.com/yLbydAD.jpg http://i.imgur.com/X5LSH6i.jpg
http://i.imgur.com/vdxlFDj.jpg
http://i.imgur.com/Vn431Vn.jpg http://i.imgur.com/bxO7u5c.jpg
http://i.imgur.com/TtHS3mD.jpg
http://i.imgur.com/7YMUotF.jpg http://i.imgur.com/kqwbHye.jpg
I end up with a .cnt file and a .hlp file, ( and a txt read me file )
http://i.imgur.com/7vD1GCw.jpg http://i.imgur.com/xT9ajOA.jpg
If I double click on that cnt I get nothing useful, but if I double click on the hlp file on an old computer then I get a nice useful user friendly thing to tell me all about Excel4 Macro stuff
http://i.imgur.com/ygnV6U0.jpg http://i.imgur.com/CCVPfeV.jpg
Vista Situation Snapshots
Some misc rough notes in support of the last few Posts..
Drucky 20thMarch (Vista)
http://i.imgur.com/e1kw9m8.jpg
HKEY_CLASSES_ROOT http://i.imgur.com/LCmH12Q.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/0QP15Z3.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/rO8dxOs.jpg
unassoc.exe has first option greyed out
Klaus lapTop 20thMarch (Vista)
http://i.imgur.com/urvtLOa.jpg]
HKEY_CLASSES_ROOT http://i.imgur.com/A6TZEvU.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/E6FLTpk.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/Ho9s4XH.jpg
unassoc.exe has first option greyed out
KB 20thMarch (Vista)
http://i.imgur.com/pJpGvUv.jpg https://i.imgur.com/6P2WiQ1.jpg
HKEY_CLASSES_ROOT http://i.imgur.com/itdpSVx.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/NKuq1YS.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/Fhb3XfI.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\UserChoice http://i.imgur.com/qOVdnMq.jpg
untypically unassoc.exe software has all options available http://i.imgur.com/HSaIsTs.jpg
ACER 22th March (Vista) (After YellowToBlueToYellow, no use of unassoc.exe
https://i.imgur.com/wcAWBxe.jpg
Note: there are no other entries : http://i.imgur.com/wdeSTls.jpg
HKEY_CLASSES_ROOT\.hlp http://i.imgur.com/wGAXvdT.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/pa8lQO3.jpg HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/hg1nOLc.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\UserChoice http://i.imgur.com/DpCPqSn.jpg
unassoc.exe now has the first option showing http://i.imgur.com/TdkDLTw.jpg
HKEY_CLASSES_ROOT http://i.imgur.com/O3lKV4b.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/jVacdaq.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/hwpbLdq.jpg
HKEY_CLASSES_ROOT http://i.imgur.com/O3lKV4b.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/jVacdaq.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/hwpbLdq.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\UserChoice
http://i.imgur.com/cD7mrtT.jpg
http://i.imgur.com/oJ0in2l.jpg
I finally end up with these ( new ) registry entries
HKEY_CLASSES_ROOT\.hpl http://i.imgur.com/wz8jVsr.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/ulLwM3T.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/INpVZNE.jpg
*** Using unassoc.exe https://eileenslounge.com/viewtopic....281746#p281746 , https://app.box.com/s/e7dd2hopzyinrrb2fdkk72scikw4rr6n
https://www.winhelponline.com/blog/u...ndows-7-vista/
An alternative for disassociating …
Vista: I examined the two entries, HKEY_CURRENT_USER ….. and HKEY_CLASSES_ROOT , in the registry before and then after below.
Using the software , unassoc.exe , I only had the the second delete option : http://i.imgur.com/mEB7aLo.jpg , http://i.imgur.com/QkXP0Ip.jpg , http://i.imgur.com/jJWVIXP.jpg
The .hlp no longer appears in the list after taking that delete option
The software seemsed to take off the HKEY_CLASSES_ROOT\.hlp only: Even after a computer restart, the HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp is still there
After following the usual way to re associate, the .hlp reappears in the list, but the removed entry does not re appear for HKEY_CLASSES_ROOT … so I have no HKEY_CLASSES_ROOT Here is the after for the other
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/1npC9iP.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/Y4uRKQi.jpg
Initially I seemed to have success.
The icon was blue suddenly. Double clicking stopped working and instead resorted back to the help that’s no help window.
After following the usual way to re associate, the icon turned yellow, the automatic opening worked, and an entry re appeared at
HKEY_CLASSES_ROOT http://i.imgur.com/nJzZYn7.jpg
Windows 7: The two entries appeared to be the same as in Vista
On running the software, I appear to have both options available. http://i.imgur.com/UUjBg8L.jpg
So I tried the first option first http://i.imgur.com/wiFxg7M.jpg , after which the first option became greyed out, http://i.imgur.com/fJGSmfN.jpg
The .hlp still appears in the list , and both entries are still in the registry, and the right click-Open With-Browse-Select/Open- my downloaded winhlp.exe association thing does not result in a successful opening of the .hlp file on double clicking on it. ( Note: the right click-Open With-Browse-Select/Open- my downloaded winhlp.exe association thing brings back the first option
Taking the second option, http://i.imgur.com/IO2MxTj.jpg , http://i.imgur.com/msWhKn5.jpg , removes the HKEY_CLASSES_ROOT\.hlp only and removes the .hlp in the unassoc.exe list.
After this we lose the blue question mark icon, and have no rightclick OpenWith option, and on double clicking on the, now plain, icon, we get the new window. http://i.imgur.com/ZnFx1xx.jpg
Following the browsing from this new window appears to have no effect, other than strangely bringing back the blue question mark icon and the right click OpenWith option
The newly re available route of right click-Open With-Browse-Select/Open- my downloaded winhlp.exe association appears to have no effect.
At this point the situation is that in the Registry we have nothing in no HKEY_CLASSES_ROOT and no entry for .hlp in the unassoc.exe list.
Strangely we have now three entries in HKEY_CURRENT_USER …..
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/AxiJxxE.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/efTpjNQ.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\UserChoice http://i.imgur.com/C5p0aKn.jpg
So I now delete the registry HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp … , which effectively leaves me with now no Registry entry.
Initially the .hlp file icon is blue , we have no OpenWith option and a double click leads to the new window. On a Computer restart , the blue question mark icon is replaced by no icon. unassoc.exe list has no .hlp and a single entry has appeared in the registry
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/Jz8zPFi.jpg
After double clicking I get the new window, and taking that route to make a new association , it takes some time before I get the window from which to browse. http://i.imgur.com/0GPeTGc.jpg
After this, all is OK, and note that the icon is yellow. http://i.imgur.com/W4TUt61.jpg
Here are the final Registries
HKEY_CLASSES_ROOT http://i.imgur.com/O3lKV4b.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/jVacdaq.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/hwpbLdq.jpg
( a .gid File also appeared )
unassoc.exe has a .hlp , the first option is greyed out, and after trying the second option, the yellow ? on the icon disappeared., we are back to the new window only after double click option… etc…
In the registry I have these
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/A0Y7cbY.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/I3D3XEP.jpg
I repeat the new window associate route, finally all is yellow ? well and Registry entries again
HKEY_CLASSES_ROOT http://i.imgur.com/JS1AjEJ.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithList http://i.imgur.com/FjEcyC1.jpg
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.hlp\OpenWithProgids http://i.imgur.com/jnxXxd0.jpg