Last active
August 29, 2015 14:04
-
-
Save felixlindemann/23ccec1aaa99a9bc805a to your computer and use it in GitHub Desktop.
VBA: Create Userform in MS-Access Programatically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Compare Database | |
Public Function getEmptyForm() As Object | |
'This is to stop screen flashing while creating form | |
' Application.VBE.MainWindow.Visible = False | |
Set getEmptyForm = Application.VBE.ActiveVBProject.VBComponents.Add(3) | |
End Function | |
Public Sub showForm(ByVal frm As Object) | |
VBA.UserForms.Add(frm.Name).Show | |
End Sub | |
Public Sub closeForm(ByVal frm As Object) | |
Application.VBE.ActiveVBProject.VBComponents.Remove frm | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment