www.pudn.com > mima.zip > frmOptions.frm


VERSION 5.00 
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX" 
Begin VB.Form Pref  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "VB-Amp Pro Prefs" 
   ClientHeight    =   4140 
   ClientLeft      =   2565 
   ClientTop       =   330 
   ClientWidth     =   6030 
   Icon            =   "frmOptions.frx":0000 
   KeyPreview      =   -1  'True 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   4140 
   ScaleWidth      =   6030 
   ShowInTaskbar   =   0   'False 
   Begin VB.CommandButton cmdOK  
      Cancel          =   -1  'True 
      Caption         =   "Okay" 
      Height          =   375 
      Left            =   4860 
      TabIndex        =   0 
      Top             =   3720 
      Width           =   1095 
   End 
   Begin TabDlg.SSTab SSTab1  
      Height          =   3615 
      Left            =   60 
      TabIndex        =   2 
      Top             =   45 
      Width           =   5910 
      _ExtentX        =   10425 
      _ExtentY        =   6376 
      _Version        =   327681 
      Tabs            =   5 
      TabsPerRow      =   5 
      TabHeight       =   520 
      TabCaption(0)   =   "Info" 
      TabPicture(0)   =   "frmOptions.frx":000C 
      Tab(0).ControlEnabled=   -1  'True 
      Tab(0).Control(0)=   "Frame9" 
      Tab(0).Control(0).Enabled=   0   'False 
      Tab(0).ControlCount=   1 
      TabCaption(1)   =   "Manual" 
      TabPicture(1)   =   "frmOptions.frx":0028 
      Tab(1).ControlEnabled=   0   'False 
      Tab(1).Control(0)=   "optView(2)" 
      Tab(1).Control(1)=   "optView(0)" 
      Tab(1).Control(2)=   "optView(1)" 
      Tab(1).Control(3)=   "optView(3)" 
      Tab(1).Control(4)=   "txtMsg" 
      Tab(1).ControlCount=   5 
      TabCaption(2)   =   "Options" 
      TabPicture(2)   =   "frmOptions.frx":0044 
      Tab(2).ControlEnabled=   0   'False 
      Tab(2).Control(0)=   "fraSample1" 
      Tab(2).Control(0).Enabled=   0   'False 
      Tab(2).Control(1)=   "Frame5" 
      Tab(2).Control(1).Enabled=   0   'False 
      Tab(2).Control(2)=   "Frame6" 
      Tab(2).Control(2).Enabled=   0   'False 
      Tab(2).Control(3)=   "Frame4" 
      Tab(2).Control(3).Enabled=   0   'False 
      Tab(2).Control(4)=   "Frame8" 
      Tab(2).Control(4).Enabled=   0   'False 
      Tab(2).Control(5)=   "Frame10" 
      Tab(2).Control(5).Enabled=   0   'False 
      Tab(2).ControlCount=   6 
      TabCaption(3)   =   "Auto On/Off" 
      TabPicture(3)   =   "frmOptions.frx":0060 
      Tab(3).ControlEnabled=   0   'False 
      Tab(3).Control(0)=   "Frame1" 
      Tab(3).Control(1)=   "Frame2" 
      Tab(3).Control(2)=   "Frame3" 
      Tab(3).ControlCount=   3 
      TabCaption(4)   =   "Paths" 
      TabPicture(4)   =   "frmOptions.frx":007C 
      Tab(4).ControlEnabled=   0   'False 
      Tab(4).Control(0)=   "Frame7" 
      Tab(4).ControlCount=   1 
      Begin VB.Frame Frame10  
         Caption         =   "Continuous Playback" 
         Height          =   600 
         Left            =   -72255 
         TabIndex        =   59 
         Top             =   2895 
         Width           =   3030 
         Begin VB.TextBox PBOverlap  
            Height          =   285 
            Left            =   1695 
            MaxLength       =   4 
            TabIndex        =   61 
            Text            =   "0000" 
            Top             =   240 
            Width           =   495 
         End 
         Begin VB.Label Label2  
            AutoSize        =   -1  'True 
            Caption         =   "Overlap (milliseconds):" 
            Height          =   195 
            Left            =   90 
            TabIndex        =   60 
            Top             =   270 
            Width           =   1575 
         End 
      End 
      Begin VB.Frame Frame8  
         Caption         =   "Misc" 
         Height          =   975 
         Left            =   -72255 
         TabIndex        =   55 
         Top             =   1890 
         Width           =   3060 
         Begin VB.CheckBox cbTimeFmt  
            Caption         =   "24hr Time Format" 
            Height          =   255 
            Left            =   90 
            TabIndex        =   58 
            Top             =   195 
            Width           =   2655 
         End 
         Begin VB.CheckBox cbClrPl  
            Caption         =   "Clear Playlist before Load" 
            Height          =   255 
            Left            =   90 
            TabIndex        =   57 
            Top             =   435 
            Width           =   2505 
         End 
         Begin VB.CheckBox cbAutoPlay  
            Caption         =   "AutoPlay on Playlist Load" 
            Height          =   255 
            Left            =   90 
            TabIndex        =   56 
            Top             =   675 
            Width           =   2370 
         End 
      End 
      Begin VB.Frame Frame7  
         Caption         =   "Paths" 
         Height          =   3135 
         Left            =   -74895 
         TabIndex        =   47 
         Top             =   375 
         Width           =   5685 
         Begin VB.CommandButton cSetVPD  
            Caption         =   "..." 
            Height          =   300 
            Left            =   5235 
            TabIndex        =   53 
            Top             =   600 
            Width           =   345 
         End 
         Begin VB.TextBox VisPLD  
            Height          =   285 
            Left            =   1275 
            TabIndex        =   52 
            Top             =   600 
            Width           =   3885 
         End 
         Begin VB.TextBox SkinPath  
            Height          =   285 
            Left            =   1275 
            TabIndex        =   49 
            Top             =   240 
            Width           =   3885 
         End 
         Begin VB.CommandButton cSetSkinDir  
            Caption         =   "..." 
            Height          =   300 
            Left            =   5235 
            TabIndex        =   48 
            Top             =   240 
            Width           =   345 
         End 
         Begin VB.Label Label1  
            AutoSize        =   -1  'True 
            Caption         =   "Vis PL Selector:" 
            Height          =   195 
            Left            =   90 
            TabIndex        =   51 
            Top             =   645 
            Width           =   1125 
         End 
         Begin VB.Label Label14  
            AutoSize        =   -1  'True 
            Caption         =   "Skins:" 
            Height          =   195 
            Left            =   780 
            TabIndex        =   50 
            Top             =   300 
            Width           =   435 
         End 
      End 
      Begin VB.OptionButton optView  
         Caption         =   "Skins" 
         Height          =   195 
         Index           =   2 
         Left            =   -72195 
         TabIndex        =   46 
         Top             =   450 
         Width           =   825 
      End 
      Begin VB.OptionButton optView  
         Caption         =   "Documentation" 
         Height          =   195 
         Index           =   0 
         Left            =   -74910 
         TabIndex        =   44 
         Top             =   435 
         Value           =   -1  'True 
         Width           =   1500 
      End 
      Begin VB.OptionButton optView  
         Caption         =   "Readme" 
         Height          =   195 
         Index           =   1 
         Left            =   -73290 
         TabIndex        =   43 
         Top             =   435 
         Width           =   1020 
      End 
      Begin VB.OptionButton optView  
         Caption         =   "Credits" 
         Height          =   195 
         Index           =   3 
         Left            =   -71280 
         TabIndex        =   42 
         Top             =   450 
         Width           =   900 
      End 
      Begin VB.TextBox txtMsg  
         Height          =   2790 
         Left            =   -74895 
         MultiLine       =   -1  'True 
         ScrollBars      =   2  'Vertical 
         TabIndex        =   40 
         Top             =   705 
         Width           =   5685 
      End 
      Begin VB.Frame Frame1  
         Caption         =   "Auto On/Off" 
         Height          =   3075 
         Left            =   -72225 
         TabIndex        =   27 
         Top             =   420 
         Width           =   3015 
         Begin VB.ComboBox OODay  
            Height          =   315 
            ItemData        =   "frmOptions.frx":0098 
            Left            =   480 
            List            =   "frmOptions.frx":00BA 
            Style           =   2  'Dropdown List 
            TabIndex        =   34 
            Top             =   240 
            Width           =   1695 
         End 
         Begin VB.TextBox OOOnTime  
            Height          =   315 
            Left            =   840 
            MaxLength       =   5 
            TabIndex        =   33 
            Text            =   "00:00" 
            Top             =   600 
            Width           =   495 
         End 
         Begin VB.TextBox OOOffTime  
            Height          =   315 
            Left            =   1680 
            MaxLength       =   5 
            TabIndex        =   32 
            Text            =   "00:00" 
            Top             =   600 
            Width           =   495 
         End 
         Begin VB.ListBox OOList  
            BeginProperty Font  
               Name            =   "Courier New" 
               Size            =   8.25 
               Charset         =   0 
               Weight          =   400 
               Underline       =   0   'False 
               Italic          =   0   'False 
               Strikethrough   =   0   'False 
            EndProperty 
            Height          =   1320 
            ItemData        =   "frmOptions.frx":0143 
            Left            =   120 
            List            =   "frmOptions.frx":0145 
            TabIndex        =   31 
            Top             =   1680 
            Width           =   2775 
         End 
         Begin VB.TextBox OOPreset  
            Height          =   315 
            Left            =   840 
            MaxLength       =   2 
            TabIndex        =   30 
            Top             =   960 
            Width           =   1335 
         End 
         Begin VB.CommandButton OOAddBtn  
            Caption         =   "Add" 
            Height          =   1035 
            Left            =   2250 
            TabIndex        =   29 
            Top             =   240 
            Width           =   645 
         End 
         Begin VB.CommandButton OODelBtn  
            Caption         =   "Delete Selected" 
            Height          =   315 
            Left            =   1500 
            TabIndex        =   28 
            Top             =   1320 
            Width           =   1395 
         End 
         Begin VB.Label Label3  
            AutoSize        =   -1  'True 
            Caption         =   "Day" 
            Height          =   195 
            Left            =   120 
            TabIndex        =   39 
            Top             =   300 
            Width           =   285 
         End 
         Begin VB.Label Label4  
            AutoSize        =   -1  'True 
            Caption         =   "Time: On:" 
            Height          =   195 
            Left            =   120 
            TabIndex        =   38 
            Top             =   660 
            Width           =   690 
         End 
         Begin VB.Label Label5  
            AutoSize        =   -1  'True 
            Caption         =   "Off:" 
            Height          =   195 
            Left            =   1380 
            TabIndex        =   37 
            Top             =   660 
            Width           =   255 
         End 
         Begin VB.Label Label6  
            AutoSize        =   -1  'True 
            Caption         =   "File/Playlist:" 
            Height          =   195 
            Left            =   90 
            TabIndex        =   36 
            Top             =   1020 
            Width           =   840 
         End 
         Begin VB.Label Label7  
            AutoSize        =   -1  'True 
            Caption         =   "On/Off List:" 
            Height          =   195 
            Left            =   120 
            TabIndex        =   35 
            Top             =   1440 
            Width           =   825 
         End 
      End 
      Begin VB.Frame Frame2  
         Caption         =   "Snooze" 
         Height          =   1395 
         Left            =   -74865 
         TabIndex        =   20 
         Top             =   2100 
         Width           =   2535 
         Begin VB.CheckBox cbSnoozeEn  
            Caption         =   "Enable Snooze" 
            Height          =   315 
            Left            =   120 
            TabIndex        =   25 
            Top             =   960 
            Width           =   1395 
         End 
         Begin VB.OptionButton SnzMd  
            Caption         =   "After:" 
            Height          =   195 
            Index           =   0 
            Left            =   120 
            TabIndex        =   24 
            Top             =   240 
            Value           =   -1  'True 
            Width           =   675 
         End 
         Begin VB.ComboBox SnzMin  
            Height          =   315 
            ItemData        =   "frmOptions.frx":0147 
            Left            =   840 
            List            =   "frmOptions.frx":0166 
            Style           =   2  'Dropdown List 
            TabIndex        =   23 
            Top             =   180 
            Width           =   855 
         End 
         Begin VB.OptionButton SnzMd  
            Caption         =   "Set Time:" 
            Height          =   195 
            Index           =   1 
            Left            =   120 
            TabIndex        =   22 
            Top             =   600 
            Width           =   1035 
         End 
         Begin VB.TextBox SnoozeAt  
            Height          =   315 
            Left            =   1140 
            MaxLength       =   5 
            TabIndex        =   21 
            Text            =   "00:00" 
            Top             =   540 
            Width           =   555 
         End 
         Begin VB.Label Label8  
            AutoSize        =   -1  'True 
            Caption         =   "minutes" 
            Height          =   195 
            Left            =   1740 
            TabIndex        =   26 
            Top             =   240 
            Width           =   540 
         End 
      End 
      Begin VB.Frame Frame3  
         Caption         =   "Options" 
         Height          =   1575 
         Left            =   -74865 
         TabIndex        =   18 
         Top             =   420 
         Width           =   2535 
         Begin VB.CheckBox cbAutoEn  
            Caption         =   "Enable Auto On/Off" 
            Height          =   255 
            Left            =   90 
            TabIndex        =   41 
            Top             =   225 
            Width           =   1995 
         End 
         Begin VB.CheckBox cbMinOnSnz  
            Caption         =   "Minimize on Off/Snooze" 
            Height          =   255 
            Left            =   90 
            TabIndex        =   19 
            Top             =   480 
            Width           =   1995 
         End 
      End 
      Begin VB.Frame Frame4  
         Caption         =   "DirAdd Extensions" 
         Height          =   660 
         Left            =   -74895 
         TabIndex        =   17 
         Top             =   405 
         Width           =   5685 
         Begin VB.TextBox ValExt  
            Height          =   315 
            Left            =   105 
            TabIndex        =   45 
            Text            =   "MP2 MP3 MID WAV MOD XM AVI MOV" 
            Top             =   240 
            Width           =   5445 
         End 
      End 
      Begin VB.Frame Frame6  
         Caption         =   "Startup" 
         Height          =   1425 
         Left            =   -74895 
         TabIndex        =   10 
         Top             =   1095 
         Width           =   2550 
         Begin VB.OptionButton TuneOpt  
            Caption         =   "File:" 
            Height          =   255 
            Index           =   2 
            Left            =   675 
            TabIndex        =   15 
            Top             =   750 
            Width           =   615 
         End 
         Begin VB.TextBox StartPlaylist  
            Height          =   285 
            Left            =   1290 
            MaxLength       =   2 
            TabIndex        =   14 
            Top             =   735 
            Width           =   1200 
         End 
         Begin VB.OptionButton TuneOpt  
            Caption         =   "Last Loaded" 
            Height          =   255 
            Index           =   1 
            Left            =   675 
            TabIndex        =   13 
            Top             =   480 
            Width           =   1470 
         End 
         Begin VB.OptionButton TuneOpt  
            Caption         =   "None" 
            Height          =   195 
            Index           =   0 
            Left            =   675 
            TabIndex        =   12 
            Top             =   240 
            Width           =   1155 
         End 
         Begin VB.CheckBox cbStartMin  
            Caption         =   "Start Minimized" 
            Height          =   255 
            Left            =   105 
            TabIndex        =   11 
            Top             =   1080 
            Width           =   1515 
         End 
         Begin VB.Label Label10  
            Caption         =   "Playlist:" 
            Height          =   255 
            Left            =   120 
            TabIndex        =   16 
            Top             =   240 
            Width           =   675 
         End 
      End 
      Begin VB.Frame Frame5  
         Caption         =   "Shutdown" 
         Height          =   900 
         Left            =   -74895 
         TabIndex        =   8 
         Top             =   2595 
         Width           =   2565 
         Begin VB.CheckBox cbSaveWin  
            Caption         =   "Save Window Position" 
            Height          =   255 
            Left            =   90 
            TabIndex        =   9 
            Top             =   255 
            Width           =   1995 
         End 
      End 
      Begin VB.Frame Frame9  
         Caption         =   "Skin" 
         Height          =   3105 
         Left            =   90 
         TabIndex        =   6 
         Top             =   375 
         Width           =   5700 
         Begin VB.CommandButton cSelSkin  
            Caption         =   "Select Skin" 
            Height          =   345 
            Left            =   105 
            TabIndex        =   54 
            Top             =   2655 
            Width           =   1605 
         End 
         Begin VB.Label SkinInf  
            BackColor       =   &H80000016& 
            Caption         =   "?" 
            Height          =   2325 
            Left            =   105 
            TabIndex        =   7 
            Top             =   240 
            Width           =   5475 
            WordWrap        =   -1  'True 
         End 
      End 
      Begin VB.Frame fraSample1  
         Caption         =   "Window" 
         Height          =   765 
         Left            =   -72255 
         TabIndex        =   3 
         Top             =   1095 
         Width           =   3060 
         Begin VB.CheckBox cbOnTop  
            Caption         =   "&Always on top" 
            Height          =   255 
            Left            =   90 
            TabIndex        =   5 
            Top             =   195 
            Width           =   1395 
         End 
         Begin VB.CheckBox cbSnap  
            Caption         =   "Snap to &Viewpoint" 
            Height          =   255 
            Left            =   90 
            TabIndex        =   4 
            Top             =   450 
            Width           =   1680 
         End 
      End 
   End 
   Begin VB.Label txtCp  
      Alignment       =   2  'Center 
      BackColor       =   &H80000018& 
      Caption         =   "(C)1999  Steve J. Gray -  V1.02  Jan 13/1999" 
      Height          =   270 
      Left            =   75 
      TabIndex        =   1 
      Top             =   3780 
      Width           =   4635 
   End 
End 
Attribute VB_Name = "Pref" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
'VB-Amp Pro Preferences 
'====================== 
' Displays a preferences window with several tabs. 
' Program options are defined as public variables accessable 
' by all forms. On load these variables are used to set 
' text-boxes and check-boxes etc. When an option is changed 
' it changes the variable, either immediately or on exiting. 
 
Dim SrcFile As String 
 
Private Sub cbAutoPlay_Click() 
    OptAutoPlay = cbAutoPlay.Value 
End Sub 
 
Private Sub Form_Activate() 
    J = frmVBAmp.AutoList.ListCount 
    For I = 0 To J - 1 
      OOList.List(I) = frmVBAmp.AutoList.List(I) 
    Next 
End Sub 
Private Sub Form_Load() 
 
    'center the form 
    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 
     
    'set options according to prefs 
    cbOnTop.Value = OptAlwaysOnTop 
    cbSnap.Value = OptSnap 
    cbSaveWin.Value = OptSavePos 
    cbAutoEn.Value = OptAuto 
    cbAutoPlay.Value = OptAutoPlay 
    cbClrPl.Value = OptClrPl 
    cbSnoozeEn.Value = OptSnooze 
    SnzMd(OptSnoozeMd).Value = True 
    SnoozeAt.Text = OptSnoozeAt 
    cbMinOnSnz.Value = OptMinOnSnz 
    TuneOpt(OptStartMd).Value = True 
    cbStartMin.Value = OptStartMin 
    StartPlaylist.Text = OptStartPlaylist 
    SkinPath.Text = OptSkinPath 
    cbTimeFmt.Value = OptTimeFmt 
    VisPLD.Text = OptVisPLPath 
    ValExt.Text = OptValExt 
    PBOverlap.Text = OptPBOverlap 
     
    OODay.ListIndex = 9 
    SnzMin.ListIndex = 5 
    SkinInf.Caption = SkinInfo 
     
    Call optView_Click(0) 
End Sub 
 
Private Sub Form_Unload(Cancel As Integer) 
    Call AlwaysOnTop(frmVBAmp, OptAlwaysOnTop) 
End Sub 
 
Private Sub cbOnTop_Click() 
    OptAlwaysOnTop = cbOnTop.Value 
    Call AlwaysOnTop(frmVBAmp, OptAlwaysOnTop) 
End Sub 
 
Private Sub cbAutoEn_Click() 
    OptAuto = cbAutoEn.Value 
End Sub 
 
Private Sub cbClrPl_Click() 
    OptClrPl = cbClrPl.Value 
End Sub 
 
Private Sub cSelSkin_Click() 
    Call frmVBAmp.SelectSkin 
End Sub 
 
Private Sub cSetSkinDir_Click() 
    A$ = GetBrowseDir(Me, "Select Skin Directory:") 
    If A$ <> "" Then SkinPath.Text = A$ 
    OptSkinPath = A$ 
End Sub 
 
Private Sub cSetVPD_Click() 
    A$ = GetBrowseDir(Me, "Select Initial VisPL Directory:") 
    If A$ <> "" Then VisPLD.Text = A$ 
    OptVisPLPath = A$ 
End Sub 
 
Private Sub cbMinOnSnz_Click() 
    OptMinOnSnz = cbMinOnSnz.Value 
End Sub 
 
Private Sub OOAddBtn_Click() 
    A$ = Left$(OODay.List(OODay.ListIndex), 1) 
    A$ = A$ & " " & Left$(OOOnTime.Text + "     ", 5) 
    A$ = A$ & " " & Left$(OOOffTime.Text + "     ", 5) 
    A$ = A$ & " " & Format$(Val(OOPreset.Text), "00") 
    If Mid$(A$, 3, 11) <> "00:00 00:00" Then 
        OOList.AddItem A$: Call SetAutoList 
    End If 
     
End Sub 
 
Private Sub OODelBtn_Click() 
    n = OOList.ListIndex 
    If n >= 0 Then OOList.RemoveItem n 
    If n > OOList.ListCount - 1 Then n = OOList.ListCount - 1 
    If n >= 0 Then OOList.ListIndex = n 
    Call SetAutoList 
End Sub 
 
Private Sub cmdCancel_Click() 
    Unload Me 
End Sub 
 
Private Sub cmdOK_Click() 
    Unload Me 
End Sub 
 
Private Sub optView_Click(Index As Integer) 
   Dim F As String 
   Select Case Index 
     Case 0: F = "vbamppro.txt" 
     Case 1: F = "readme.txt" 
     Case 2: F = "skins.txt" 
     Case 3: F = "credits.txt" 
   End Select 
   Call LoadTxt(F) 
End Sub 
 
Private Sub LoadTxt(F$) 
    SrcFile = App.Path & "\" & F$ 
    If Dir$(SrcFile) <> "" Then 
      FIO2 = FreeFile 
      Open SrcFile For Input As FIO2 
      txtMsg.Text = Input$(LOF(FIO2), FIO2) 
      Close FIO2 
    Else 
      txtMsg.Text = "Could not open file!" 
    End If 
End Sub 
 
Private Sub cbSaveWin_Click() 
    OptSavePos = cbSaveWin.Value 
End Sub 
 
Private Sub PBOverlap_Change() 
    OptPBOverlap = Val(PBOverlap.Text) 
End Sub 
 
Private Sub SkinPath_Change() 
    OptSkinPath = SkinPath.Text 
End Sub 
 
Private Sub cbSnap_Click() 
    OptSnap = cbSnap.Value 
End Sub 
 
Private Sub SnoozeAt_Change() 
    OptSnoozeAt = SnoozeAt.Text 
End Sub 
 
Private Sub cbSnoozeEn_Click() 
    OptSnooze = cbSnoozeEn.Value 
    SnoozeTm = -Abs(SnoozeTm) 
End Sub 
 
Private Sub SnzMd_Click(Index As Integer) 
    OptSnoozeMd = Index 
End Sub 
 
Private Sub SnzMin_Click() 
    SnoozeTm = -Val(SnzMin.List(SnzMin.ListIndex)) 
End Sub 
 
Private Sub cbStartMin_Click() 
    OptStartMin = cbStartMin.Value 
End Sub 
 
Private Sub StartPreset_Change() 
    OptStartPlaylist = StartPlaylist.Text 
End Sub 
 
Private Sub cbTimeFmt_Click() 
    OptTimeFmt = cbTimeFmt.Value 
End Sub 
 
Private Sub TuneOpt_Click(Index As Integer) 
    OptStartMd = Index 
End Sub 
 
Private Sub txtMsg_KeyPress(KeyAscii As Integer) 
    KeyAscii = 0 
End Sub 
 
Private Sub SetAutoList() 
    FM.AutoList.Clear 
    For I = 0 To OOList.ListCount - 1 
        frmVBAmp.AutoList.List(I) = OOList.List(I) 
    Next 
End Sub 
 
Private Sub ValExt_Change() 
    OptValExt = ValExt.Text 
End Sub