Visual Basic Example Logging on to Schedule+

Article translations Article translations
Article ID: 140542 - View products that this article applies to.
This article was previously published under Q140542
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all


In Microsoft Excel, you can programmatically control Microsoft Schedule+, through Visual Basic for applications using OLE Automation. To use the properties and methods in the object library provided by Schedule+, you will need to create an object variable using the CreateObject function.


The following example will log you on to Schedule+, display the path to the schedule file, and then log you off.

Microsoft provides examples of Visual Basic for applications procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

To use the macro, do the following:

  1. Open a new workbook, insert a module sheet.
  2. In the new module sheet, type the following macro code:
       ' In this example you will have to activate Microsoft Excel
       ' before issuing any commands that require user interaction.
       Sub Logging_On_To_SchedulePlus()
       Dim objSched As Object
       Dim CurApp As String
       Dim UserName as String
       'sets the caption of the active application to a variable
       CurApp = Application.Caption
       'creates the Schedule+ object
       Set objSched = CreateObject("scheduleplus.application.7")
          ' Checks to see if you are logged on to Schedule+
          If Not objSched.LoggedOn Then
              AppActivate CurApp 'activates Excel
             'prompts you for you email name
             UserName = Application.InputBox("Please Enter Your Email Name")
              objSched.Logon UserName, "", True   'logs you onto schedule+
          End If
       AppActivate CurApp  'activates excel
       MsgBox objSched.UserAddress ' Displays the path to the user's schedule
                                   ' file
       objSched.Logoff 'logs off of schedule+
       Set objSched = Nothing ' clears the object
       End Sub
  3. Run the macro.


BackOffice Software Developer's Kit, version 1.5


Article ID: 140542 - Last Review: September 27, 2013 - Revision: 1.5
  • Microsoft Excel 95 Standard Edition
  • Microsoft Schedule+ 97 Standard Edition, when used with:
    • Microsoft Windows 95
kbnosurvey kbarchive kbhowto kbprogramming KB140542

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from