Sabtu, Januari 10, 2015

Using Excel Macro To Make Button or Image Show Message When Clicked

Example:
  • Insert > Shapes > Choose picture > Make picture > Right click on picture > Assign Macro... > New

    or

    Developer > Insert > Choose picture > Make picture > New/Right click then click New/View Code

    then will appear:
    Sub namaObject_Click()

    End Sub
  • Add message code between sub with End Sub:
    Sub namaObject_Click()
      MsgBox "Hello... There is someone click this button just now... : )"
    End Sub
  • Open again ms excel window place where picture was made
  • Click on other place to remove past of right click on picture, and now try to click picture (normal click/left click), then message will show when picture is clicked

Source: Tutorial Excel Indonesia: https://www.youtube.com/watch?v=CjeC1lqQuwI

0 komentar: