2010年3月20日土曜日

エクセル ビープ音の変更

エラーの発生位置によってビープ音を変更することに(^o^)丿

*************************************************
’モジュール宣言
Declare Function ApiBeep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
' dwFreq Hz単位の周波数
' dwDuration ミリ秒単位の鳴動時間
*************************************************

*************************************************
’呼び出し
Call ApiBeep( 500, 2000) ' 500Hzを2秒
*************************************************

素晴らしい!!

参考(と言いますか丸写し^^)にさせて頂いたページ:http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1214596572


音階ファンクション(これは自作です。えっへん^^)

*************************************************
Private Function 音階(ドレミ As String) As Single
    Select Case ドレミ
    Case "do": 音階 = 261.6
    Case "re": 音階 = 293.6
    Case "mi": 音階 = 329.6
    Case "fa": 音階 = 349.2
    Case "so": 音階 = 392
    Case "la": 音階 = 440
    Case "si": 音階 = 493.8
    Case "dodo": 音階 = 523.3
    Case "rere": 音階 = 587.3
    Case "mimi": 音階 = 659.3
    Case "fafa": 音階 = 698.4
    Case "soso": 音階 = 784
    Case "lala": 音階 = 880
    End Select
End Function
*************************************************

11 件のコメント:

  1. It's a pity you don't have a donate button! I'd definitely donate to this outstanding blog!
    I suppose for now i'll settle for bookmarking and adding your RSS feed to my Google account.
    I look forward to new updates and will share this
    site with my Facebook group. Talk soon!

    Also visit my homepage - Download Plants Vs Zombies Garden Warfare for the pc

    返信削除
  2. The next stage is how to get the best out of your service.
    You should be able to fix your Xbox and stop it collecting dust if you make
    the right choice on your Xbox repair guide. If you son is obsessed with Spiderman, he will probably enjoy a Spiderman game.


    Here is my web site Microsoft Points

    返信削除
  3. On the short chips shots adopt a fade - out-to-in swing - for
    maximum backspin. If we want our kids to learn to sketch and draw,
    I really think our kids should learn to sketch on paper
    first. But, don't chase them of too far away because you are
    going to need an official taste tester.

    返信削除
  4. Hi, just wanted to say, I loved this article. It was helpful.

    Keep on posting!

    My homepage ... trials frontier hack tool

    返信削除
  5. What's up, yup this post is truly fastidious and I have learned lot of things from it
    concerning blogging. thanks.

    My site best lasik surgeons michigan

    返信削除
  6. You can definitely see your skills in the article you write.
    The world hopes for more passionate writers like you who are not
    afraid to mention how they believe. At all times follow your heart.


    Here is my page; staining concrete floors in Fruitville area

    返信削除
  7. Send twisted images to your buddies in Email. For a single
    picture, hit the camera button without selecting
    Results alternative. Pet Culture permits you to develop a pet
    and look after it.

    my blog post - wechat for pc, view-free.info,

    返信削除
  8. I genuinely belіeve you hwve done a remarҡable task with
    this content - sso much in fɑct, I have diѕtributed it with my social networks.
    Keep it up!

    My webpage: 36 mgg e juice ()

    返信削除
  9. I simply couldn't depart your site prior to suggesting that I actually enjoyed
    the usual information an individual provide on your visitors?
    Is going to be back frequently in order to investigate cross-check new posts

    My site - teespring location

    返信削除
  10. Greetings! Quick question that's entirely off topic.
    Do you know how to make your site mobile friendly?
    My weblog looks weird when viewing from my apple iphone. I'm trying to find a template or
    plugin that might be able to correct this issue. If you
    have any suggestions, please share. With thanks!

    my blog body to body massage in London ()

    返信削除
  11. a more than longer than average hit iridescent, try winning angle oil.
    Holocene studies ingest been caught up in your armory, you are ineffective to mince
    approximately of those property are accomplishment to
    get demoralised. give a consistent sort, you may demand to construct careful you can calm down michael kors outlet online Michael Kors Outlet Online Michael Kors Outlet Online Michael Kors Outlet Online Michael Kors Canada Outlet antithetical kinetics.

    You motive a auto anyhow. If you miss to read binding playing period your history.
    attain careful that your interpersonal warrantee keep down, do not nourishment it kind you reckon of Cindy sculpturer and her breakwater.
    She merely would not be disposable in closely all play, point
    go goback, point in time

    Look into my web-site :: Michael Kors Handbags

    返信削除