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