Help with calling Data Form

G

Guest

Hello all,

Having managed to create a reporting tool, first attempt at excel VBA, my
manager now wants an update built in. I thought the easiest way would be to
call the Standard Form from the Data tab. Although by simply highlighting the
cells, and selecting from the drop down lis, my code does not appear to work.

Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = Worksheets("GSOPs")
Range("A3:H32").Select
With ActiveSheet
..ShowDataForm
End With

Any suggestions would be gratefully recieved. 2 days to finish this off and
multiple sheets to build in to the options.

Thanks,

End Sub
 
G

Guest

I'm not sure what you mean by "Standard Form" but in your code to show a form,
You need to type the form name something like this:
UserForm1.Show
And UserForm1.Hide

to hide it.

This is assuming your form name is: "UserForm1" which is the default name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top