VBA/pricelevel.frm

96 lines
1.8 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"
2023-04-27 07:36:19 -04:00
ClientHeight = 9975.001
2022-05-12 17:39:53 -04:00
ClientLeft = 120
ClientTop = 465
2023-04-27 07:36:19 -04:00
ClientWidth = 10620
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
2022-08-04 16:47:57 -04:00
Private Sub cbNUMERIC_Click()
End Sub
2022-05-17 10:33:24 -04:00
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()
2023-04-27 07:36:19 -04:00
Dim i As Long
Dim j As Long
Dim numRows As Long
Dim numCols As Long
Dim colWidths() As Long
Dim lbColumnWidths As String
2022-05-17 10:33:24 -04:00
Dim pl() As String
pl = x.SHTp_Get("Price Levels", 3, 1, True)
2023-04-27 07:36:19 -04:00
Call x.TBLp_FilterSingle(pl, 3, 0, False)
2022-05-17 10:33:24 -04:00
Me.lbPriceLev.list = x.TBLp_StringToVar(x.TBLp_Transpose(pl))
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
2023-04-27 07:36:19 -04:00
tbEddDate.text = "03/01/2023"
2022-05-17 10:33:24 -04:00
End Sub