add the DataForm to a Form Control Button

2021-02-02T14:03:40.58+00:00

I am trying what I thought would be a simple button add to an excel 365 worksheet. I need to add the DataForm to a button so users will have an easy location to click and add data.

The code I am using is this:

Sub open_form()
'
' open_form Macro
Range("e5").Select (the first cell in the table of data)
ActiveSheet.ShowDataForm
End Sub

But I am getting Run-time error '1004'
ShowDataForm method of Worksheet class failed.

All the examples i am seeing on line state this should work..
What am i doing wrong??

Thanks in advance...

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nothing Left To Lose 396 Reputation points
    2021-02-03T03:13:15.747+00:00

    Re: starting the Data Form

    1. Just in case: A Mac doesn't have this feature.
    2. Name your data "Database"

    NLtL
    https://1drv.ms/u/s!Au8Lyt79SOuhZ_zj8wEtOjDcqAI?e=MrzfpA
    Calculate Payments, Custom_Functions, Professional_Compare, Add_Table of Contents

    0 comments No comments