VBA/pricelevel.frm

87 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-05-12 17:39:53 -04:00
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} pricelevel
Caption = "Build Customer Price List"
2022-05-17 10:33:24 -04:00
ClientHeight = 7920
2022-05-12 17:39:53 -04:00
ClientLeft = 120
ClientTop = 465
2022-05-17 10:33:24 -04:00
ClientWidth = 8775.001
2022-05-12 17:39:53 -04:00
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
2022-05-17 10:33:24 -04:00
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
2022-05-27 00:26:36 -04:00
tbPATH.text = fd.SelectedItems(1)
2022-05-17 10:33:24 -04:00
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 pl() As String
pl = x.SHTp_Get("Price Levels", 3, 1, True)
2022-05-17 10:33:24 -04:00
Me.lbPriceLev.list = x.TBLp_StringToVar(x.TBLp_Transpose(pl))
Dim i As Long
For i = 1 To lbPriceLev.ListCount - 1
2022-05-17 10:33:24 -04:00
If lbPriceLev.list(i, 0) = Selection Then
lbPriceLev.Selected(i) = True
Me.tbPriceLev = Selection
Exit For
End If
Next i
tbEddDate.text = "06/01/2022"
End Sub