Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export VBA forms

Status
Not open for further replies.

alonzo51087

Technical User
Aug 12, 2005
10
0
0
US
Is there any way to export a vba form to an application file or have the UserForm run on its own instead of through Excel?
 

Hi,

You can EXPORT a Form to a .frm file.

However, it can only be manipulated (displayed & run) with the appropriate MS application like Word, Excel, Outlook, Powerpoint, Access or complied into an .exe in Visual Basic n.m

Skip,
[sub]
[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue][/sub]
 
Code:
Sub Exp()
 On Error Resume Next
  ActiveWorkbook.VBProject.VBComponents.Remove _
             ActiveWorkbook.VBProject.VBComponents.Item("UserForm1")
 On Error GoTo 0
 ThisWorkbook.VBProject.VBComponents("UserForm1").Export "UserForm1.frm"
 ActiveWorkbook.VBProject.VBComponents.Import ("UserForm1.frm")
 Kill ("UserForm1.frm")
End Sub

Exporting and inporting a form.
Fane Duru
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top