add the DataForm to a Form Control Button


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)
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

    Re: starting the Data Form

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

    Calculate Payments, Custom_Functions, Professional_Compare, Add_Table of Contents

    0 comments No comments