i have a useform, in order for that user form to open up I need one row of data this is the test row data. In Userform intialize it tells it to filter out data on a sheet which then provides the values for the combobox.
I need to have the test row in the background but dont want it to show up in the combobox.
This is the code below. I have a command button that opens the userform. If i have no data in datasheet the userform doesnt open and throws back an error. but if i have a test row then the userform opens.
Private Sub UserForm_Initialize()
Dim LDate As String
Dim lastRowColA As Long
Dim AssetDataCells As String
Set tempsheet3 = Sheets(cTempSheet3Name)
LDate = Date
lblUsername = GetXLUserName
cboAsset.List = Sheet2.Range("A2", "A10").Value
cboAssetSelect.List = tempsheet3.Range("A1", "A10").Value
lblDateAuto = LDate
'Copy data to temporary sheet where it will provide a list of unique Assets for the cboAssey combobox and
'filtered data for the lstAssetEstimates listbox
Set dataSheet = Sheets(cDataSheetName)
Set temporarySheet = Sheets(cTemporarySheetName)
firstFilteredCopyRow = 0
'Determine the last row containing data
lastDataRow = .Cells(.Rows.Count, "A").End(xlUp).Row
'Clear temporary data
.AutoFilterMode = False
'Filter unique Assets on data sheet column B and copy list to temporary sheet column A