Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Excel UserForm Initialize フォームの初期処理でセルの値を参照

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,508
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 6, 2009

←の詳細は http://ie.vba-ken3.jp/sample/001/2009-03-07.html を見てください。セルのB6に書かれた値を初期値として利用します。

フォームの初期処理のイベント
UserForm_Initialize で
Range("B6") の値を代入後、
.Navigate で ページに飛ばしただけですが。。

Private Sub UserForm_Initialize() 'Formの初期処理
Me.txtURL.Text = Range("B6") 'URL初期値
Me.WebBrowser1.Navigate Me.txtURL.Text
End Sub

こんな感じで
セルの値を初期値として使うと、
プログラムの変更無く、いろいろな動作ができます。
※設計段階、初めから考えとけって?
 う~ん、ここらへんが、設計者のセンスの有無って感じかなぁ・・・
 もちろん、私は、設計力の無い 三流プログラマーです。

他の処理でも、セルに初期値やパラメーターを書き込み、
モジュールから参照すると意外と便利ですよ。

  • likes, 1 dislikes

Link to this comment:

Share to:

Video Responses

see all

All Comments (0)

Sign In or Sign Up now to post a comment!
Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more