This commit is contained in:
Paul Trowbridge 2022-05-20 13:12:21 -04:00
parent 69af558e8b
commit efd470bce3
5 changed files with 10 additions and 9 deletions

View File

@ -34,7 +34,7 @@ Sub test_full20()
unp = unpivot_current_sheet(lists, pcol) unp = unpivot_current_sheet(lists, pcol)
login.Caption = "Postgres Login" login.Caption = "PostgreSQL Login"
login.tbU = "report" login.tbU = "report"
login.tbP = "report" login.tbP = "report"
login.Show login.Show
@ -354,7 +354,7 @@ PRICELIST_SHOW:
'--------Open file------------- '--------Open file-------------
If Not x.FILEp_CreateCSV(pricelist.tbPATH.text & "\" & Replace(pl_code, ".", "_") & ".csv", ul) Then If Not x.FILEp_CreateCSV(pricelist.tbPath.text & "\" & Replace(pl_code, ".", "_") & ".csv", ul) Then
MsgBox ("error") MsgBox ("error")
End If End If
@ -490,6 +490,7 @@ Sub build_customer_files()
Dim effdate As Date Dim effdate As Date
'----------------------pick price level--------------------------------------------------------------------- '----------------------pick price level---------------------------------------------------------------------
login.Caption = "PostgreSQL Login"
login.tbU = "report" login.tbU = "report"
login.tbP = "report" login.tbP = "report"
login.Show login.Show
@ -503,7 +504,7 @@ Sub build_customer_files()
Exit Sub Exit Sub
End If End If
effdate = CDate(pricelevel.tbEddDate.text) effdate = CDate(pricelevel.tbEddDate.text)
filepath = pricelevel.tbPATH & "\" & plev filepath = pricelevel.tbPath & "\" & plev
'---------------------get full code list-------------------------------------------------------------------- '---------------------get full code list--------------------------------------------------------------------
fc = x.ADOp_SelectS(0, "SELECT * FROM rlarp.plcore_build_fullcode_cust('" & plev & "', '" & effdate & "'::date)", False, 20000, True, PostgreSQLODBC, "usmidlnx01", False, login.tbU.text, login.tbP.text, "Port=5030;Database=ubm") fc = x.ADOp_SelectS(0, "SELECT * FROM rlarp.plcore_build_fullcode_cust('" & plev & "', '" & effdate & "'::date)", False, 20000, True, PostgreSQLODBC, "usmidlnx01", False, login.tbU.text, login.tbP.text, "Port=5030;Database=ubm")
@ -739,7 +740,7 @@ Sub build_customer_files()
End If End If
Next wb Next wb
If filepath <> "" Then nwb.SaveAs Filename:=filepath & "\HC Companies Distributor Price List.xlsx" If pricelevel.tbPath.text <> "" Then nwb.SaveAs Filename:=filepath & "\HC Companies Distributor Price List.xlsx"
For Each wb In Workbooks For Each wb In Workbooks
If wb.Name = "HC FullCode List.xlsx" Then If wb.Name = "HC FullCode List.xlsx" Then
@ -752,7 +753,7 @@ Sub build_customer_files()
End If End If
Next wb Next wb
If filepath <> "" Then fcwb.SaveAs Filename:=filepath & "\HC FullCode List.xlsx" If pricelevel.tbPath.text <> "" Then fcwb.SaveAs Filename:=filepath & "\HC FullCode List.xlsx"
End Sub End Sub

View File

@ -34,7 +34,7 @@ Private Sub cbFolder_Click()
Set fd = Application.FileDialog(msoFileDialogFolderPicker) Set fd = Application.FileDialog(msoFileDialogFolderPicker)
fd.Show fd.Show
tbPATH.text = fd.SelectedItems(1) tbPath.text = fd.SelectedItems(1)
End Sub End Sub

Binary file not shown.

View File

@ -31,7 +31,7 @@ End Sub
Private Sub bOK_Click() Private Sub bOK_Click()
If tbPATH = "" Then If tbPath = "" Then
MsgBox ("no directory specified") MsgBox ("no directory specified")
Exit Sub Exit Sub
End If End If
@ -49,7 +49,7 @@ Private Sub bPICK_Click()
Set fd = Application.FileDialog(msoFileDialogFolderPicker) Set fd = Application.FileDialog(msoFileDialogFolderPicker)
fd.Show fd.Show
tbPATH.text = fd.SelectedItems(1) tbPath.text = fd.SelectedItems(1)
End Sub End Sub
@ -108,7 +108,7 @@ Private Sub UserForm_Initialize()
cbDTL.list = dtl cbDTL.list = dtl
login.Caption = "CMS Login" login.Caption = "CMS Login"
login.tbU = Mid(Application.UserName, 1, 10) login.tbU = UCase(Mid(Mid(Application.UserLibraryPath, 10, InStr(10, Application.UserLibraryPath, "\") - 10), 1, 10))
login.tbP = "" login.tbP = ""
login.Show login.Show
If Not login.proceed Then Exit Sub If Not login.proceed Then Exit Sub

Binary file not shown.