VBA/pricelevel.frm

99 lines
1.8 KiB
Plaintext

VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} pricelevel
Caption = "Build Customer Price List"
ClientHeight = 9975.001
ClientLeft = 120
ClientTop = 465
ClientWidth = 10620
OleObjectBlob = "pricelevel.frx":0000
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "pricelevel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public x As New TheBigOne
Public cancel As Boolean
Private Sub cbCancel_Click()
cancel = True
Me.Hide
End Sub
Private Sub cbFolder_Click()
Dim fd As Object
'--------Open file-------------
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
fd.Show
tbPATH.text = fd.SelectedItems(1)
End Sub
Private Sub cbNUMERIC_Click()
End Sub
Private Sub cbOK_Click()
cancel = False
Me.Hide
End Sub
Private Sub lbPriceLev_Click()
Dim i As Long
For i = 1 To lbPriceLev.ListCount
If lbPriceLev.Selected(i) Then
tbPriceLev.text = lbPriceLev.list(i, 0)
Exit For
End If
Next i
End Sub
Private Sub UserForm_Initialize()
Me.cancel = True
End Sub
Sub repopulate()
Dim i As Long
Dim j As Long
Dim numRows As Long
Dim numCols As Long
Dim colWidths() As Long
Dim lbColumnWidths As String
Dim pl() As String
pl = x.SHTp_Get("Price Levels", 3, 1, True)
Call x.TBLp_FilterSingle(pl, 3, 0, False)
Me.lbPriceLev.list = x.TBLp_StringToVar(x.TBLp_Transpose(pl))
For i = 1 To lbPriceLev.ListCount - 1
If lbPriceLev.list(i, 0) = Selection Then
lbPriceLev.Selected(i) = True
Me.tbPriceLev = Selection
Exit For
End If
Next i
tbEddDate.text = Format(Date, "mm/dd/yyyy")
End Sub