Microsoft Excel provides a very handy function called the ‘Info’ function which allows Workbook designers to give users various system information without a lot delving around in VBA etc.
For this demonstration we will use the Info function to enter the directory path of the current workbook into a cell.
- Firstly you will need to open up a new Excel workbook and for best results save it in a known place.
- Next, in the cell in which you want to see the directory path for the workbook to appear, type the function =Info(“Directory”) and press enter, you will now see a screen similar to the below that shows the directory path to the workbook – Note, this doesn’t show the actual filename of the workbook itself, just where it’s located.
Obviously, in a working environment you will need to add a few extra bells and whistles to tell the user what’s going on, but this should give you an idea of how to use the ‘Info’ function within Microsoft Excel.
Other ‘Info’ options
The ‘directory’ option is only one in a range of options available to the ‘Info’ command, a full list is shown below, all are used in exactly the same way as the ‘directory’ option.
- Directory – Directory path to the current workbook.
- Memavail – Amount of memory available in bytes.
- Memused – Amount of memory being used for data in bytes.
- Numfile – Number of active sheets in the open workbooks.
- Origin – Returns the cell reference of the top-leftmost cell visible in the window, also returns the cell reference type
- Osversion – Current operating system version as text.
- Recalc – Current recalculation mode, returns “Automatic” or “Manual”
- Release – Version of Microsoft Excel as text.
- System – Name of the type of operating, Windows PC’s return “pcdos”, Mac OS’s return “mac”.
- Totmem – Total memory available, including memory in use, in bytes.