I am porting 32bit VBA to 64bit and the VBA now generates the following error on two lines of code:
Run-time error '1004': Method 'VBProject' of object '_Workbook' failed
The offending VBA is:
I can comment out this code to continue execution where the next line generates the same error.
frmUserForm is declared as an Object
Any help appreciated
Run-time error '1004': Method 'VBProject' of object '_Workbook' failed
The offending VBA is:
VBA Code:
Application.VBE.MainWindow.Visible = False
VBA Code:
Set frmUserForm = ThisWorkbook.VBProject.VBComponents.Add(vbext_ct_MSForm)
Any help appreciated