Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call Issue
I have a workbook that has ComboBoxes, InputBoxes and CommandButtons in the
top 20 rows. I need to be able to control those items so that if a user happens to have his cursor placed on rows 1 through 20, the buttons and boxes will give him an error message saying he needs to be in the lower part of the workbook. I have adjusted one of the click subs as follows: If ActiveCell.Row < 21 Then TooHighUp Else myCell = "A" & ActiveCell.Row Range(myCell).Offset(0, 0).Range("A1:AJ1").Select Selection.Interior.ColorIndex = xlNone ActiveCell.Select The routine TooHighUp is shown below: Private Sub TooHighUp() MsgBox ("You need to be in the lower part of the workbook.") End Sub Part of the coding is working correctly. If the user is below row 20, the macro runs as it should, if the user is above row 20 the macro displays the Message Box, but then the sub TooHighUp returns control to my click event and that program runs. How do I tell the macro to run the Sub TooHighUp and then stop? Thanks for your help, once again. Tofer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wouldn't know what to call it! | Excel Worksheet Functions | |||
I'm not sure what you'd call it, but is it possible to do this? | Excel Discussion (Misc queries) | |||
Call Center Management: How to calculate 'cost per call' | Excel Discussion (Misc queries) | |||
Call | Excel Programming | |||
DLL Call | Excel Programming |