C
carrera
I assigned macros to texts boxes on the sheets in an excel workbook, so that
inexperienced computer users can highlight particular rows on one worksheet,
and move them to another.
Here is an example of a macro, moving information from "sheet abc" to "sheet
def"...
Sub sheetabck2sheetdef()
'
' sheetabc2sheetdef Macro
' Macro recorded 3/13/2008 by userx
'
'
Selection.Cut
Sheets("sheet def").Select
Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Sheets("sheet abc").Select
Selection.Delete Shift:=xlUp
Range("A14:A15").Select
Sheets("sheet def").Select
Cells(Rows.Count, "A").End(xlUp).Offset(0, 0).Select
End Sub
My problem: I notice if I accidently click a text box the macro was assigned
to, and no rows were selected, the actual text box transfers to the other
sheet.
What row of code can I add to prevent this, or how can I otherwise prevent
this from happening?
inexperienced computer users can highlight particular rows on one worksheet,
and move them to another.
Here is an example of a macro, moving information from "sheet abc" to "sheet
def"...
Sub sheetabck2sheetdef()
'
' sheetabc2sheetdef Macro
' Macro recorded 3/13/2008 by userx
'
'
Selection.Cut
Sheets("sheet def").Select
Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Sheets("sheet abc").Select
Selection.Delete Shift:=xlUp
Range("A14:A15").Select
Sheets("sheet def").Select
Cells(Rows.Count, "A").End(xlUp).Offset(0, 0).Select
End Sub
My problem: I notice if I accidently click a text box the macro was assigned
to, and no rows were selected, the actual text box transfers to the other
sheet.
What row of code can I add to prevent this, or how can I otherwise prevent
this from happening?