In most cases, the workflow like that would be:
1. Run a VBA macro (a public method in an VBA module);
2. The macro brings up the UserForm to collect data from user;
3. User clicks either "Generate/OK" or "Cancel" button, which hides the UserForm with someway indicates the UserForm is oked, or cancelled;
4. If the UserForm is oked, gather the user-input data from the UserForm;
5. Create new drawing with the user-input data, or use the data on existing (bland?) drawing.
So, for the UserForm, you may have a member field like this
Public oked As Boolean
....
Then for the "Generate" and "Cancel" button, you would have their click event handler like:
Private Sub GenerateCommandButton_Click
If Not ValiddateUserInputs() Then '' you may want to make sure all required data are entered
MsgBox "Some requried data missing!"
Exit sub
End If
oked=True
Me.Hide
End Sub
Private Sub CancelCommandButton_Click
oked=False
Me.Hide
End Sub
Then here is the VBA Macro in module:
Public Sub CreateNewDrawing()
' You'd better define a class to hold the data
' inputted by user
Dim newDwgData As DwgData
UserForm1.Show
if UserForm1.oked Then
Set newDwgData='' get from the UserForm1, it is up to your code
CreateNewDrawing newDwgData
End if
Unload UserForm1
End Sub
Private Sub CreateNewDrawing(data As DwgData)
Dim dwg As cadDocument
Set dwg=Application.Documents.Add([template path/name])
''Do whatever with the AcadDocument with user-input data stored in data parameter
......
dwg.SaveAs [file name]
End Sub