Quote:
|
Originally Posted by Starsky
Thanks MTB. Let's see if I understand correctly. Your function is to handle input errors? Much appreciated. Do you know how I might get a correctly entered value into the new sheet code?
|
Well no, the function is to get a valid row number from the user, but to do this you need to check that is is valid!
In you code paste the HeaderRowIsValid() function in a Code Module. Then in the macro that does to worksheet inserting row copying etc, at the point where you want to get the row number from the user type this
Code:
Dim ThisHeadingRow as long
If Not HeaderRowIsValid(ThisHeadingRow) Then Exit Sub
If a valid number is enered the code will contiue (with ThisheadingRow set to the user vale). If the user presses Cancel on the InpuBox when it will exit the current sub
I am of on Hols now so unless I can get internet access where we are staying I will not be around until a week on Monday
Cheers
MTB