PDA

View Full Version : [SOLVED:] Run-time error 438: Object doesn't support this property or method



GEORGE PERRY
03-07-2021, 04:43 PM
Please i need some help on this i am learner in this field. this is the issue i am having.
28067



Sub Add_Product_List()


Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Product_Master")

Dim I As Integer

Me.Cmb_Product.Clear
Me.Cmb_Product.AddItem ""

For I = 2 To Application.Worksheetsfunction.CountA(sh.Range("A:A"))
Me.Cmb_Product.AddItem sh.Range("B" & I)

Next I

Paul_Hossler
03-07-2021, 06:41 PM
Worksheetsfunction


No 's'


It's WorksheetFunction


https://docs.microsoft.com/en-us/office/vba/api/excel.worksheetfunction

SamT
03-07-2021, 11:29 PM
Sub Add_Product_List()
With Me.Cmb_Product
.Clear
.List = Sheets("Product_Master").Range(Cells(2, "B"), Cells(Rows.Count, "B").End(xlUp))
End With
End Sub

snb
03-08-2021, 01:10 AM
See

https://www.snb-vba.eu/VBA_Fill_combobox_listbox_en.html

GEORGE PERRY
03-08-2021, 04:32 AM
Great the answer worked correctly. thanks.

GEORGE PERRY
03-08-2021, 05:10 AM
hi please i want my application to give me the rate if a product, transaction type and quantity is selected but if i run the app. this is the result.
Run time error '13':
Type mismatch
28069