For a project of mine it would be greatly beneficial to create a userform programmatically. I've found some exmaple on the web, but none of them work on my computer. As far as I can tell all the examples were written based in office 2000. I need mine to work with office 2003.
Below are some of the suggested lines for inputted a new userform via code. Each requires a refence. I've added in the correct references in my workbook and still each line gives an error.
Neither works for me in Excell 2003. Anybody know of other methods?
Thanks!
BD
Below are some of the suggested lines for inputted a new userform via code. Each requires a refence. I've added in the correct references in my workbook and still each line gives an error.
Code:
'Requires Microsoft Visual Basic for Applications Extensibility 5.3 reference library
Set mynewform = ThisWorkbook.VBProject.VBComponents.Add(vbext_ct_MSForm)
'Requires Microsoft Forms 2.0 Object Library
Set NewForm = ThisWorkbook.VBProject.VBComponents.Add(3)
Neither works for me in Excell 2003. Anybody know of other methods?
Thanks!
BD