Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Colleen Burton   on Jan 22 In MS Office Category.

  
Question Answered By: Feodora Bonkob   on Jan 22

It didn't work, but I did locate
the problem. It appears that I'd sent you (and perhaps others) down
the wrong track - sorry. The 'object required' error  was with the
show method. The show method needs to be

VBA.UserForms.Add(ThisForm).Show

rather than ThisForm.Show. The later method only seems to work with
the Application.VBE.ActiveVBProject.VBComponents.Import method if it's
in a Sub Called from the Sub containing the import method - not the
other way around or not if the two are in the same Sub.

When the macro stopped after incurring the run-time  error, no debug
option was available; the only choice was to End the macro. It turns
out that when this occured and I went into VBE to look to see what was
going on, the 'view' that would appear was wherever I was prior to
running the macro, not where the problem was. Since I was editing the
module containing that Import code, I assumed incorrectly that the
error occurred in that module.

I still need to figure out why the imported form behaves differently
than if it were not imported...

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 


Tagged: