Inserts a toggle button control which remains pressed

This preview shows page 1 - 2 out of 2 pages.

: Inserts a toggle button control which remains pressed in when clicked, and then releases when clicked again o Each ActiveX control has a set of properties you can change o Similar to formatting a shape by changing its color, font, etc ‘ Check Transportation Button Procedure Author: Firstname Lastname ‘ Date Created: Todays Date ‘ Function: When clicked, the Check Transportation button checks if the value in cell F20 is less than 200 and if the Air check box is selected. If these two conditions are true, a message box will display to require a supervisor’s signature. Otherwise a message box will display indicating that the transportation mode is OK Private Sub CheckTransportation_Click() If Air = True Then TitleBarText = “Air” MessageText = “To use air transportation, miles one way should equal 200 or more.” MsgBox Message Text, , TitleBarText Else TitleBarText = “Travel Method Checked” MessageText = “Travel method OK.” MsgBox Message Text, , TitleBarText End If End Sub This code will cause a second message box to display if the Air check box is selected and the mileage is 200 or more. It will also display if the Air check box is not selected.
Image of page 1

Subscribe to view the full document.

**Note: make sure you use TWO commas after Message Text any typos in the sub and the VBA code won’t work Restore initial settings if use computer in public location Remove quick access toolbar buttons if created Delete macros
Image of page 2
  • Fall '08
  • SHROFF
  • Widgets, ActiveX control, button control, Air check box, check transportation button

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern