Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide & Show Rows based on Check Boxes loza Excel Discussion (Misc queries) 1 September 14th 08 01:49 AM
Check Box to Show/Hide Columns rudy Excel Programming 4 July 27th 06 10:08 PM
Check boxes to show/hide Tabs Sridhar Rao Excel Worksheet Functions 1 January 5th 05 03:28 PM
Check Box Show Hide Paul Excel Programming 1 December 3rd 04 10:08 PM
Show Form, Hide all Sheets John Pierce Excel Programming 2 June 10th 04 10:42 AM


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"