Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to check omissions and show/hide form
Hello, all.
I have a macro where I want it to check 5 columns on each line for errors and if there are needed corrections then show the user form, if not, to continue. I keep receiving an Object Error message at the "frm.Hide" line. Range("A2").Select TotalRowsToDo = ActiveCell.CurrentRegion.Rows.Count Counter = 1 Do Until Counter = TotalRowsToDo If Len(ActiveCell.Offset(0, 2).Value) < 4 Then frm.Show Else If Len(ActiveCell.Offset(0, 3).Value) < 4 Then frm.Show Else If Len(ActiveCell.Offset(0, 5).Value) < 8 Then frm.Show Else If Len(ActiveCell.Offset(0, 4).Value) < 10 And Len(ActiveCell.Offset(0, 6).Value) < 8 _ Or Len(ActiveCell.Offset(0, 6).Value) 9 Then frm.Show Else If IsEmpty(ActiveCell.Offset(0, 4).Value) And _ IsEmpty(ActiveCell.Offset(0, 6).Value) Then frm.Show frm.Hide ActiveCell.Offset(1, 0).Select Counter = Counter + 1 Loop Thanks in advance for your help! Valerie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide & Show Rows based on Check Boxes | Excel Discussion (Misc queries) | |||
Check Box to Show/Hide Columns | Excel Programming | |||
Check boxes to show/hide Tabs | Excel Worksheet Functions | |||
Check Box Show Hide | Excel Programming | |||
Show Form, Hide all Sheets | Excel Programming |