Help with userform problem: error message> "obj doesn't support thisproperty or method"

C

Chet

I have some code that was working fine and now when I come to the
userform.show command I get the error message "Object doesn't support
this property or method.".

The only cause that I can come up with is I have been updating the
form from another computer and re-importing it into the workbook.
Possibly this caused some type of corruption? The userform does have
the name I reference in the code below also. Any other ideas on
getting it working again? It used to work just fine and no major
changes made.

Thanks, Chet

'SHOW THE DATA FORM
RunStatusSortSubtotal = True
FWRdataSortSubTtl.Show <<<<<<<<<<<=== Code crashing here!!
If Not RunStatusSortSubtotal Then GoTo TakeToEnd
 
S

Sam Wilson

Use F8 to step through the code - if there's some code in the userform
initialize event then an error there sometimes shows up at the frm1.Show
stage in debug.

Sam
 
N

norie

Goto Tools>Options... in the VBE and on the General tab select Break
On all Errors.

Now when you get the error hit debug and you should be taken to the
code that's causing the error.
 
C

Chet

What you said worked.. there was an error in the code and now it
stopped at the error versus somewhere else! Thanks for the tip...
Chet
 
N

norie

Chet

No problem - remember to change the setting back.

Some code relies on using errors for some things, eg to see if a sheet
exists.

Personally I keep the setting to break on all errors, it's fun.:)
 

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