If I am correct useing a function is to cut down on having to write the samething over and over again! right?
anyhow if I am wrong please correct and put me on the right path to what is that does that ok below is some code that I am having trouble with
so I have this code that works
Private Sub EnhNameList2_GotFocus()
Enhnamelist2.Dropdown
End Sub
but I dont want to write that 7 times one for each EnhNameList1-7_GotFocus() ext... so I thought I could use a function
Function dropd(num)
Enhnamelist(num).Dropdown
End Function
Private Sub EnhNameList2_GotFocus()
dropd (2)
End Sub
and then just call drop(2) in the GotFocus() but that doesnt work???
anyhow if I am wrong please correct and put me on the right path to what is that does that ok below is some code that I am having trouble with
so I have this code that works
Private Sub EnhNameList2_GotFocus()
Enhnamelist2.Dropdown
End Sub
but I dont want to write that 7 times one for each EnhNameList1-7_GotFocus() ext... so I thought I could use a function
Function dropd(num)
Enhnamelist(num).Dropdown
End Function
Private Sub EnhNameList2_GotFocus()
dropd (2)
End Sub
and then just call drop(2) in the GotFocus() but that doesnt work???