Macro controlling Excel Data Form

Status
Not open for further replies.

ortizSr

Board Regular
Joined
Apr 8, 2003
Messages
76
I am using Excel 2000 SR-1, and have constructed the following maco to to keep an Excel Data Form open so that existing line items can be selected and the Units and/or the Unit Price columns be filled with changes.

Without this macro the Excel Form does not accept more than one edit at a time, and so to take effect the form must be closed and re-opened for the next edit.

This Macro is working, but it limit me to the DO Until Counter = X.

How can I make this a variable, or better yet set the limit high, but allow the User to break out of the Macro without losing any changes made.

Sub EnterUnits()
'
' Macro to show form for entering Units
' &/or changing Unit Prices
'

Counter = 0

Do Until Counter = 3

Counter = Counter + 1
Sheets("Invoice Master").Select
Application.Goto Reference:="Database"
ActiveSheet.ShowDataForm
Loop
Close

End Sub
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Status
Not open for further replies.

Forum statistics

Threads
1,221,695
Messages
6,161,360
Members
451,699
Latest member
sfairbro

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