Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

create macro button launch

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Create a Macro Button to Launch the Form Dialog Box

Create a Macro Button to Launch the Form Dialog Box

ResolvedVersion 2010

Rebecca has attended:
Word Introduction course
Excel Intermediate course
Word Intermediate course
Excel Advanced course
PowerPoint Introduction course

Create a Macro Button to Launch the Form Dialog Box

Is it possible to Create a Macro Button to Launch the Form Dialog Box. I tried to record the Macro but I can not stop the macro once I have opened the form Dialog box.

RE: Create a Macro Button to Launch the Form Dialog Box

Hi Rebecca,

Thank you for your question.

Do you mean in Excel?

Can you please tell me some more detail of what you are trying to achieve.

Regards

Simon

RE: Create a Macro Button to Launch the Form Dialog Box

Hi Rebecca,

Further to my response, you would have to write small macro.

Here is the code:

Sub auto_open()
' Activate the sheet that contains your database.
Worksheets("Sheet1").Activate

' Show the data form for the selected range.
ActiveSheet.ShowDataForm
End Sub

Copy the code from Sub Auto_open up to and including End Sub in to the VB Editor window.

On your keyboard, use Alt + F11 which will open the code window. There should be a project explorer window on the left with all the sheet names. Double click on the sheet name you want the data form to appear on and paste the code in the right hand window.

Let me know how you get on.

Regards

Simon

Thu 12 Jul 2012: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Access tip:

Create An Inaccessible Field On A Form

There is sometimes a need to make a field in a form look like a normal field but be completely inaccessible to the user. To do this:

In the Field's Properties
Set the ENABLED property to No
Set the LOCKED property to Yes

The field will not grey out, but the user will not be able to do anything with it.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.