In object -Sheet2- I've this:
Private Sub Listbox1_Change()
keuze = Sheet2.Listbox1.Text
End Sub
I want to use the variable keuze in a module, but what I try, it's empty. How can I solve this?
Declare keuze in module as
Public keuze As String
Then after assigning keuze = Sheet2.Listbox1.Text you can access value of keuze in module also.
By using the Public keyword, variable will be available across all modules and the value of Public variable will preserve until Workbook is closed or reset the Project.