Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Rose Howard   on Nov 26 In MS Office Category.

  
Question Answered By: Madeeha Malik   on Nov 26

From the article you referenced, I think this is more what you are
looking for:

Sub SetFormCaption(frmstart)
Set MyForm = VBA.UserForms.Add(frmstart)
MyForm.Caption = lblCaptionTitle & ": " & MyForm.Name
MyForm.Show
End Sub

There is also an issue with the scope of the MyForm object, so if
you want to Show it outside of the SetFormCaption sub, MyForm must
declared at a higher scope by placing

Public MyForm As Variant

At the top of the module.

Share: 

 

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

 
Didn't find what you were looking for? Find more on Changing Caption of form by name at runtime Or get search suggestion and latest updates.


Tagged: