forecast_api/Master Template.xlsm_EXPORTS/build.frm
PhilRunninger b10a3ac655 Add a function to treat 1x1 ranges as an array, not a scalar value.
The Range.Value function does not consistently return a 2-D array. If
the range is a single cell, it returns just the value in that cell. When
initializing a Userform listbox, it needs to be an array, so this
function was born.
2024-03-15 10:09:56 -04:00

40 lines
1.0 KiB
Plaintext

VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} build
Caption = "Change the Mix"
ClientHeight = 1590
ClientLeft = 120
ClientTop = 465
ClientWidth = 10725
OleObjectBlob = "build.frx":0000
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "build"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public useval As Boolean
Private Sub cmdCancel_Click()
useval = False
Me.Hide
End Sub
Private Sub cmdOK_Click()
useval = True
Me.Hide
End Sub
Public Sub Initialize(part As String, billTo As String, shipTo As String)
cbPart.list = RangeToArray(shSupportingData.ListObjects("ITEM").DataBodyRange)
cbPart.Value = part
cbBill.list = RangeToArray(shSupportingData.ListObjects("CUSTOMER").DataBodyRange)
cbBill.Value = billTo
cbShip.list = RangeToArray(shSupportingData.ListObjects("CUSTOMER").DataBodyRange)
cbShip.Value = shipTo
useval = False
End Sub