Sub CaptureAScreenAndSave() Dim shistory As ScreenHistory Dim rcode As ReturnCode Dim filename As String 'Check or set the file name for the screen filename = InputBox("Save current screen image to:", , Environ("USERPROFILE") & "\Documents\Micro Focus\Reflection\Screen.rshx") 'Get the history object and capture a screen Set shistory = ThisIbmTerminal.Productivity.ScreenHistory shistory.CaptureScreen 'Save the screen to a screen history file rcode = shistory.SaveScreenHistoryFile(filename, True) 'Clear the screen history and close the screen history panel shistory.ClearAllScreens End Sub