Y
Yann
I want to create a userform by vba (word 2000)
here is the code :
(cut and pasted from http://support.microsoft.com/kb/204330/en)
I get a runtime error 75 when it reach the .name="Helloworld" line
(everything else works fine, the form is created, the caption and the
dimensions are correctly set when the .name line is skipped)
Sub BuildMyForm()
Set mynewform = _
ActiveDocument.VBProject.VBComponents.Add(vbext_ct_MSForm)
With mynewform
.Properties("Height") = 246
.Properties("Width") = 616
.name = "HelloWord"
.Properties("Caption") = "This is a test"
End With
End Sub
any idea ?
many thanks in advance
here is the code :
(cut and pasted from http://support.microsoft.com/kb/204330/en)
I get a runtime error 75 when it reach the .name="Helloworld" line
(everything else works fine, the form is created, the caption and the
dimensions are correctly set when the .name line is skipped)
Sub BuildMyForm()
Set mynewform = _
ActiveDocument.VBProject.VBComponents.Add(vbext_ct_MSForm)
With mynewform
.Properties("Height") = 246
.Properties("Width") = 616
.name = "HelloWord"
.Properties("Caption") = "This is a test"
End With
End Sub
any idea ?
many thanks in advance