PROBLEM DISPLAYING USERFORM

  • Thread starter john.9.williams
  • Start date
J

john.9.williams

Hi

i have a multi userform program it was fine now i cannot load one of my
forms (userform3) i get the following error message
'runtime error -2147352573 (80020003) could not find the specified
object.

I use this code to generate userform3 from userform1

Private Sub CommandButton4_Click()
Unload Me
Call SHOWCLEARS
End Sub

the userform1 unloads and calls showclears

Sub SHOWCLEARS()
Application.ScreenUpdating = False
Call counter
Application.ScreenUpdating = True
UserForm3.Show
End Sub

it debugs at the userform3.show line

the counter module above is

Sub counter()
Dim clears
Application.ScreenUpdating = False
Sheets("CLEARS").Select
Range("A3").Select
clears = 0
Do While Selection.Value <> ""
ActiveCell.Offset(1, 0).Activate
clears = clears + 1
Loop
Sheets("CODES").Select
Range("D2") = clears
Range("a1").Select
Sheets("menu").Select
Application.ScreenUpdating = True
End Sub

this counts the number of lines within the range that a listbox on
userform3 shows.

any help greatly recieved

john
 
T

Tom Ogilvy

have you tried hitting the reset button in the VBE?

Or closing Excel and reopening it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top