Hi,
I am very new to VBA and having issue with listbox.
for example
Formname = Main shows in VB as Form_MAin
Listbox = JobStatus
Multi Column
I have a function in a module
If I call this from a button on the form it works, but if I try to call it from another function in the module it generates an error access does not allow you yo use this method in the current view.
I basically want to be able to fill a listbox on a form via the module so I can update column 2 later.
Help sppreciated
I am very new to VBA and having issue with listbox.
for example
Formname = Main shows in VB as Form_MAin
Listbox = JobStatus
Multi Column
I have a function in a module
Code:
Public Function FillStatusList()
With Form_Main.JobStatus
.ColumnCount = 2
.RowSourceType = "Value List"
.RowSource = ""
.AddItem ("Loading Main WORKBOOK File;")
.AddItem ("Loading Latest Cut Off File;")
.AddItem ("Copy Data From Latest Orders File;")
.AddItem ("Pasting Data into Main Workbook File;")
End With
End Function
If I call this from a button on the form it works, but if I try to call it from another function in the module it generates an error access does not allow you yo use this method in the current view.
I basically want to be able to fill a listbox on a form via the module so I can update column 2 later.
Help sppreciated