Error 13

  • Thread starter Thread starter Jonsson
  • Start date Start date
J

Jonsson

Hi,
I have this code:

Dim i As Long
ActiveSheet.Select
ActiveSheet.Unprotect password:="!"
For i = 3 To 32
Rows(i).EntireRow.Hidden = Range("A" & i).Value = 0
Next i
ActiveSheet.Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.Select
For i = 3 To 32
Rows(i).EntireRow.Hidden = False
Next i
ActiveSheet.Protect password:="!"
Range("A1").Select
End Function

It works at my office 2000 and also saving as office 95.
But when trying run the code in office 97 I get something like "erro
13" and "incompatible types"

I have checked VBA, Tools, Reference, and in 95 I have:

VB for applications
Microsoft excel 8.0 object library
Microsoft forms 2.0 object library
Microsoft office 8.0 object library

In office 2000 I have 9.0 instead of 8.0
Is that´s why I have this problem ? And if there is, is it a way aroun
it ?

any help is apprecciated.

//Thoma
 
What line of code is causing the problem?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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

Back
Top