Referring to SubClasses

Hi Everyone

1 simple questions I hope. I’m using a very simple macro to bulk insert a load of classes and objects (which I have typed into a spreadsheet). This works great and saves me a lot of time.

But I want to extend this so that the class I create is a subclass.

Can I do this.

FYI the code that I am using to create the class in the first instance is:

For RowNumC = 1 To RngC.Rows.Count
Set Cls = Univ.Classes.Add(RngC.Cells(RowNumC, 1))
Next RowNumC

where RngC is a range in a defined spreadsheet.

Thanks in advance.

:sleeping: It’s Monday.


Grantie :uk: (BOB member since 2004-07-01)

Sorry for wasting your time guys. I did say it was Monday. I thought I’d searched everywhere but I hadn’t. Found something useful on the BO Knowledge Base (Resolution 9079). If anyone is interested, here was the line of code I was looking for:

Set clNew = uni.Classes.FindClass("AnyClassName").Classes.Add("SubClassName")

Grantie :uk: (BOB member since 2004-07-01)