Solved Macro to Clear Listbox

justin0312

New member
Local time
Tomorrow, 01:28
Joined
Jul 2, 2021
Messages
22
I have a macro to clear my forms (cbo, txtbox). Recently, I added few listbox to my form and the clear button wont work. Anyone can advise?

My current macro is using runmenucommand > UndoRecord
 
Try assigning the null value to your listbox.
 
Do the added listboxes have default selections defined? An UNDO would take effect but if there is a default, it would be re-asserted.
 
On macro Designer, make sure that you toggle "Show All Actions"

Add to your macro:

SetValue
Item: [listboxnameHere]
Expression: [listboxnameHere].[ItemData](0)

SetValue
Item: [listboxnameHere]
Expression: -1
 
On macro Designer, make sure that you toggle "Show All Actions"

Add to your macro:

SetValue
Item: [listboxnameHere]
Expression: [listboxnameHere].[ItemData](0)

SetValue
Item: [listboxnameHere]
Expression: -1
I tried and is not working. Maybe i do it wrongly. Do you have any image example?
 

Users who are viewing this thread

Back
Top Bottom