From efd470bce36fc4da67a315e5a9be864262e29e9b Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 20 May 2022 13:12:21 -0400 Subject: [PATCH] clean up --- PriceLists.bas | 11 ++++++----- pricelevel.frm | 2 +- pricelevel.frx | Bin 3608 -> 3608 bytes pricelist.frm | 6 +++--- pricelist.frx | Bin 4632 -> 4632 bytes 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/PriceLists.bas b/PriceLists.bas index 198bd9f..ea5bfb0 100644 --- a/PriceLists.bas +++ b/PriceLists.bas @@ -34,7 +34,7 @@ Sub test_full20() unp = unpivot_current_sheet(lists, pcol) - login.Caption = "Postgres Login" + login.Caption = "PostgreSQL Login" login.tbU = "report" login.tbP = "report" login.Show @@ -354,7 +354,7 @@ PRICELIST_SHOW: '--------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") End If @@ -490,6 +490,7 @@ Sub build_customer_files() Dim effdate As Date '----------------------pick price level--------------------------------------------------------------------- + login.Caption = "PostgreSQL Login" login.tbU = "report" login.tbP = "report" login.Show @@ -503,7 +504,7 @@ Sub build_customer_files() Exit Sub End If effdate = CDate(pricelevel.tbEddDate.text) - filepath = pricelevel.tbPATH & "\" & plev + filepath = pricelevel.tbPath & "\" & plev '---------------------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") @@ -739,7 +740,7 @@ Sub build_customer_files() End If 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 If wb.Name = "HC FullCode List.xlsx" Then @@ -752,7 +753,7 @@ Sub build_customer_files() End If 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 diff --git a/pricelevel.frm b/pricelevel.frm index 8001ba5..463b300 100644 --- a/pricelevel.frm +++ b/pricelevel.frm @@ -34,7 +34,7 @@ Private Sub cbFolder_Click() Set fd = Application.FileDialog(msoFileDialogFolderPicker) fd.Show - tbPATH.text = fd.SelectedItems(1) + tbPath.text = fd.SelectedItems(1) End Sub diff --git a/pricelevel.frx b/pricelevel.frx index 6bcad5beeb4bb238b0fcdf5b02571f1700d648ff..77016448063732a6cc73dc34303c0b0b96c3ac97 100644 GIT binary patch delta 58 zcmbOsGec%W3kz$&+W)yZn>$%vGBZ|AF6QWFWZ3+lV=^Nn!{o_an#}53Dktyf`o)+( Oc^9`fQ0f`C5fcE1Boy2L delta 58 zcmbOsGec%W3k$2m-kaVjn>$%vGBYwvF6QWFWZe9pV=^NnH(KTO`w^$RGq Oi(8v9fAceLBPIZBlN6W$ diff --git a/pricelist.frm b/pricelist.frm index f730575..1be657c 100644 --- a/pricelist.frm +++ b/pricelist.frm @@ -31,7 +31,7 @@ End Sub Private Sub bOK_Click() - If tbPATH = "" Then + If tbPath = "" Then MsgBox ("no directory specified") Exit Sub End If @@ -49,7 +49,7 @@ Private Sub bPICK_Click() Set fd = Application.FileDialog(msoFileDialogFolderPicker) fd.Show - tbPATH.text = fd.SelectedItems(1) + tbPath.text = fd.SelectedItems(1) End Sub @@ -108,7 +108,7 @@ Private Sub UserForm_Initialize() cbDTL.list = dtl 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.Show If Not login.proceed Then Exit Sub diff --git a/pricelist.frx b/pricelist.frx index 594136e95559a5b908cd90b95724013229362226..95439c48075d1f4323af963a2f693fe35456aeed 100644 GIT binary patch delta 146 zcmbQCGDBrU3kz#QvTd@}P=i!&yl;r3)^U|^Um y!PClYrLl1H0-i1=Muy4S{0kWqC!gi7XJne}E1&}usS;2FiYyeU0kY);e*pl#P%tL| delta 144 zcmV;B0B`@8B$y