USE CAUTION! Any time you declare a variable as public it is important to understand all the consequences and how they behave. In order to make a variable public it has to have the keyword 'Public' rather than 'dim'. It also has to be declared in a module before the first procedure declaration. It does… Continue reading Public Variables in VBA
Tag: userform
Clear All Check Boxes In Excel VBA Userform
This example uses a for each loop so that each check box name does not have to be explicitly written out. This is useful when you are adding more control and limit the amount of code you are writing. Better Method Dim ctrl As Control Sub ClearAllButton_Click() For Each ctrl In exportFilesUF.Controls If TypeName(ctrl) =… Continue reading Clear All Check Boxes In Excel VBA Userform