0

There is a built-in data entry form in Excel. I have added a shortcut to this and its quite good. It has a few little issues (i.e. it depends what cell you have selected as to what data it fills in the form).

So I want to wrap it up into a macro and add my own button. My little macro will select the appropriate cell. So the question is, using VBA, how do you call the build-in Data Entry form?

-EDIT-

Seems my question is not clear... so here is some more:

There is a built-in data entry form that you can use, see here: Built-in Data Entry Form

I want to open this form using excel VBA, like this:

Sub OpenTheBuiltinDataEntryForm()
    ' Add code here to open the built-in data entry form...    
End Sub
code_fodder
  • 15,263
  • 17
  • 90
  • 167

1 Answers1

2

The line you are looking for is:

Activesheet.ShowDataForm

but note that your data table must begin within A1:B2 or be named Database or you will get an error.

Rory
  • 32,730
  • 5
  • 32
  • 35
  • Awesome!, I could not find that info anywhere, thanks :) – code_fodder Oct 20 '14 at 15:35
  • Is there a way to get this to work with the data table beginning somewhere else? or how do you name it database? – Jon Fuller Sep 14 '16 at 13:21
  • Select the whole data range and type Database in the name box on the left of the formula bar, or use the Name Manager on the Formulas tab. – Rory Sep 14 '16 at 15:14