Skip to content

TM AutoChart

This Excel add-in links the minimum, maximum, major, and minor values of a chart axis to worksheet cells.

For more see http://www.tushar-mehta.com/excel/software/autochart/index.html

Display a message for a specific duration

There are a number of instances where one may want to show a message for a specific duration. In other instances it might be for a specific duration or until the user acknowledges the message, whichever comes first. In the first category would be something like a splash screen or a very brief acknowledgment of some activity. In the latter category might fall a custom splash screen or a check to see if the workbook is still in use.

For a post in a page by itself (i.e., not in a scrollable iframe control) see http://www.tushar-mehta.com/publish_train/xl_vba_cases/1023_display_message_for_a_specific_duration.shtml

ByRef Arguments and the Application.Run Method

The Application.Run method is a versatile mechanism to call a subroutine particularly in another workbook or add-in. Its one documented limitation, if we want to call it that, is that all arguments are passed by value (ByVal). So, how does one pass an argument by reference (ByRef)?

For a version in a page by itself (i.e., not in a scrollable iframe as below) visit http://www.tushar-mehta.com/publish_train/xl_vba_cases/1022_ByRef_Argument_with_the_Application_Run_method.shtml

Discussion Page for TM Timer for PowerPoint

This is the discussion page for TM Timer for Microsoft PowerPoint

PowerPivot – Part 4 of 4: A geographic visual display of 18 million US Census records

For a version in a page by itself (i.e., not in a scrollable iframe as below) visit http://www.tushar-mehta.com/publish_train/xl_vba_cases/powerpivot_conditional_shape_color.shtml

Run multiple programs in one step

This tip applies to the Windows operating system.

There are instances when I want to run a set of programs. One example is shortly after I log on to my computer when would like to start up MS Outlook, Firefox, IE 64bit, and Forte Agent.

I wrote a VBS script, run through the Windows Script Host, that does the needful.

Create a text file (use Notepad if you want or MS Word)

Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.Run “”“%ProgramFiles(x86)%\Microsoft Sysinternals\procexp.exe”“”
WshShell.Run “”“%ProgramFiles(x86)%\mozilla firefox\firefox.exe”“”
WshShell.Run “”“%programfiles%\internet explorer\iexplore.exe”“”
WshShell.Run “”“%ProgramFiles(x86)%\microsoft office\office12\outlook.exe”“”
WshShell.Run “”“%ProgramFiles(x86)%\Agent\agent.exe”” c:\users\tm\Forte\Agent”

Save the file as “My Programs.vbs” or whatever you prefer. This is one of those rare instances when I would consider putting a file on the desktop. To run all the programs double click the file. Assuming you have the correct full program name in each line, that program will start running. An error on one line will terminate the script.

Note the required use of quotes around a program name when the name has a space in it. To insert a quote in a string one must use two consecutive quotes. Consequently, a quote at the start of a string requires three quotes in succession. The first starts the string and the next 2 cause the 1st character in the string to be a quote. Similar logic applies when the quote is at the end of the string. Otherwise, one would see just 2 consecutive quotes as after the .exe in the last line of the file.

The above uses the environment variables programfiles and ProgramFiles(x86), which map to the 64bit program directory and the 32bit program directory respectively. To not use them, replace the %variable% with the explicit path.

Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.Run “”“C:\Program Files (x86)\Microsoft Sysinternals\procexp.exe”“”
WshShell.Run “”“c:\program files (x86)\mozilla firefox\firefox.exe”“”
WshShell.Run “”“c:\program files\internet explorer\iexplore.exe”“”
WshShell.Run “”“c:\program files (x86)\microsoft office\office12\outlook.exe”“”
WshShell.Run “”“C:\Program Files (x86)\Agent\agent.exe”” c:\users\tm\Forte\Agent”

Tushar Mehta
www.tushar-mehta.com

Discussion Page for TM Calendar

Comments or suggestions about the Excel add-in TM Calendar

Use a calendar in Excel

Set a reminder

See the reminder

Discussion Page for “Excel Does Not Quit”

This is the place to discuss the post Excel Does Not Quit

Discussion Page for TM Table of Contents

This is a discussion about the TM Table of Contents add-in.

Using the Excel MATCH Function for a Linear Search and a Binary Search