Hi, I'm trying to load a user control at runtime. I am not using any form, everything will be done using a Module and classes.
I can do this if I have an ActiveX control or reference, but can't seem to figure out how to do this with a user control
The Below works fine, but I need to also have ShellPipe.ctl loaded as I will be running commands via cmd at set intervals.
Thanks in advanceCode:Dim TimerAutomate As ccrpCountdown Set TimerAutomate = New ccrpCountdown TimerAutomate.Duration = 10000 TimerAutomate.Enabled = True Do Doevents Loop While TimerAutomate.Enabled = True msgbox "Timer has finished counting down"
Update: I managed to Declare ShellPipeMain as ShellPipe, and in my Class, set Public WithEvents ShellPipeMain As ShellPipe
Class:
Module:Code:Public WithEvents TimerAutomate As ccrpTimers6.ccrpCountdown Public WithEvents ShellPipeMain As ShellPipe
Not I get an error: Object variable or With block variable not setCode:Public ShellPipeMain As ShellPipe
Is there something else I need to do/declare?




Reply With Quote
