Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to create a UserForm X. If, for whatever reason, form X
already exist, I want to remove it and re-create it again. Sounds simple, right? Here's the code: Dim TempForm As Object ' VBComponent On Error Resume Next Set TempForm = ThisWorkbook.VBProject.VBComponents("Bob") ThisWorkbook.VBProject.VBComponents.Remove TempForm On Error GoTo 0 'Set TempForm = Nothing Set TempForm = ThisWorkbook.VBProject.VBComponents.Add(vbext_ct_M SForm) ThisWorkbook.VBProject.VBComponents(TempForm.name) .name = "Bob" Last line gives me a "Run time error 75: path file access error"... Any suggestion? And, before you ask, even god have less privilege than me on that machine... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBComponent documentation | Excel Programming | |||
Can't pass VBComponent to Sub Procedure in VB.Net | Excel Programming | |||
VBIDE.VBComponent | Excel Discussion (Misc queries) | |||
VBComponent Types | Excel Programming | |||
Relating Worksheet(I).Name with VBComponent(J).Name | Excel Programming |