Can't create a new instance of the Range class

D

deltaquattro

Hi all,

why is the following is invalid code?

Sub foo()

Dim MyRange As Range
Set MyRange = New Range

End Sub

The New statement works with a class defined in a Class Module, but it
looks like it doesn't work with classes in the Excel Object Model. Is
there any workaround for this? Thanks,

Best Regards

Sergio Rossi
 
Top