ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   manipulating the built-in Data Form (https://www.excelbanter.com/excel-programming/283879-manipulating-built-data-form.html)

Paul James[_4_]

manipulating the built-in Data Form
 
I'm using the VBA code "ActiveSheet.ShowDataForm" to open the Data Form
that's built into Excel. I'm looking for a way to exercise some control
over the use of that form with VBA. For example:

1. Is there any way you can use VBA to remove or disable two of the command
buttons on that form (New and Delete)?

2. As an alternative to removing them, is there any way I can use VBA to
undo their effect? That is, if the delete button is executed, to restore
the deletion, or if the New button is clicked, have a message box appear
before those two command buttons are executed,

3. At the very least, is there any way to use VBA to close the DataForm if
either of those two buttons is selected?

Thanks in advance,

Paul



Vasant Nanavati

manipulating the built-in Data Form
 
I believe the answer to all three questions is, unforunately, "No".

In general, VBA allows you to display a built-in dialog, to change the
values of some of its default parameters, and to determine whether the
Cancel button was clicked. For anything more, you would have to design your
own dialog.

--

Vasant


"Paul James" wrote in message
news:E_Mxb.243172$mZ5.1811888@attbi_s54...
I'm using the VBA code "ActiveSheet.ShowDataForm" to open the Data Form
that's built into Excel. I'm looking for a way to exercise some control
over the use of that form with VBA. For example:

1. Is there any way you can use VBA to remove or disable two of the

command
buttons on that form (New and Delete)?

2. As an alternative to removing them, is there any way I can use VBA to
undo their effect? That is, if the delete button is executed, to restore
the deletion, or if the New button is clicked, have a message box appear
before those two command buttons are executed,

3. At the very least, is there any way to use VBA to close the DataForm if
either of those two buttons is selected?

Thanks in advance,

Paul





Paul James[_4_]

manipulating the built-in Data Form
 
I was afraid of that.

Thanks, Vasant.

Paul




All times are GMT +1. The time now is 07:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com