Monday, May 29, 2017

Play Musical Notes In Excel



           Musical notes (piano notes) can be played with buttons and functional keys in Excel.

- Ago, we added buttons to the worksheet .Then ,we assigned the macros to these buttons to play the music notes(.wav files) that are in the same place as the workbook. Example ;

  Private Sub CommandButton2_Click()
  Call sndPlaySound32(ThisWorkbook.Path & "\a1.wav", 0)
  Range("F2").Activate
  End Sub

- If desired music notes can be played with function keys F1, F2 etc. We used the following codes for this process :

Sub A_1()
    Call sndPlaySound32(ThisWorkbook.Path & "\a1.wav", 0)
End Sub
Sub auto_open()
Application.OnKey "{F1}", "A_1"
....
End Sub

Sunday, May 21, 2017

Product Filtering Between Two Dates Using Userform

Between the selected dates ,product-based filtering can be done using the userform.



        When the dates (start date,end date) are entered in text boxes and if report button is pressed  the userform  elongation effect is activated and listbox appears.
When choosing a date to add into text boxes,the date userform was used instead of date picker control :


The found results are listed on the listbox.