Forms Feature

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,341
Office Version
  1. 365
Platform
  1. Windows
I just came across the "Forms" in the Ribbon feature in Excel and would like to use it. But I want to launch it from a button using VBA.

I tried recording the macro and it gave me this:

Code:
Sub Forms_Show()
'
    ActiveSheet.ShowDataForm
    
End Sub


But it doesn't seem to work if I launch it from a button.

I get a Run-time 1004
ShowDataForm method of Worksheet class failed.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi gheyman,

what about using

VBA Code:
'  set cursor into datarange like
  Range("B3").Select
  Application.CommandBars.FindControl(ID:=860).Execute

Ciao,
Holger
 
Upvote 0
Solution
It only works if the selection is within the top left few cells (can't remember the exact limits offhand) or your data set is named Database.
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top