View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mats Samson Mats Samson is offline
external usenet poster
 
Posts: 112
Default Dim sheet objects

Hello,
I'm trying to Declare worksheet Comboboxes (from Control Toolbox) as object
variables, but I don't know how to refer to them!
Dim CoBo as MSForms.Combobox
doesn't work on a worksheet, CoBo turns to Nothing and and I get a Type
Mismatch Error. I found that Controls are referred to as OLEObjects but I
can't find information how to declare the variable.
For Each CoBo In Worksheets("Calculation").OLEObjects
CoBo.Clear
If Left(CoBo.Name, 4) = "Curr" Then
CoBo.List = CurrVar
End If
Next

Thanks for help!
Mats