View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
bllittle bllittle is offline
external usenet poster
 
Posts: 9
Default Type Mismatch error when trying to generically set ComboBox to aComboBox variable

that's interesting. I did not know that. Not that I doubt you, but I'm
not sure it is always accurate.

For example, if I create a variant and assign a worksheet to it, I
don't get the contextual methods and properties specific to a
worksheet if I use the variable in the code. But if I declare a series
of variables, ending by typing them As Worksheet, it would appear
early binding is taking place as the contextual methods and properties
work just fine. I wonder if declaring object type variables behaves
differently than data type variables.

I thought someone was going to call me on not declaring the
DAO.Database variable -- I didn't realize I'd been using it from a
module level declaration until I tried to further streamline some
things elsewhere in the module. so, if anyone reads this long after
the fact, dbHRawData should be declared as
Dim dbHRawData As DAO.Database

On Apr 7, 3:53*pm, GS wrote:
Dim lngRecords, lngFields, lngRows, lngColumns As Long


Just so you know; In the line above the only variable that is type
declared as 'Long' is the last one. The first 3 become type 'Variant'
by default because you did not specify their type.