View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default refedits in a userform control class

Hello,

I'm working on a userform with some RefEdit controls. I found, I believe,
that there's no way to have an accelerator key for a RefEdit, so I thought
I'd create one by creating a refedit control class and defining a KeyDown
event. But now in my class module, I find that neither of the following is
a valid statement:

Public WithEvents formcontrol As RefEdit - it generates a compile error of
"Expected user-defined type, not Project."

Public WithEvents formcontrol As MSForms.RefEdit - MSForms doesn't contain a
RefEdit member

I know that RefEdits are problematic, and it's certainly being reinforced
here, but does anybody have a way to do this? I'm also just interested in
why it says "Not Project" in the compile error message above.

Thanks,

Doug