View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default run-time error 13: Type mismatch?

Perhaps the name of your 6th sheet has a space in it - if so, replace
the space with underscore.

Hope this helps.

Pete

On Feb 5, 12:42*pm, Marko Enula <Marko
wrote:
Hello!

I have on excel file what worked just fine for quite long time, but now
suddenly when i open it first it will give me such a message:"this
application is about to initialize ActiveX controls that might be unsafe. If
you trust the source of this file, select ok and the controls will be
initialized using your current workspace settings" i press ok there. And then
I am receiving a run time error 13 type mismatch I press debug and this line
with - is highlighted and if i put ' this before the line it takes next line
yellow :
Public Sub InitSheets()
* * Set shtCreate = Application.Sheets(1)
* * Set shtSwitch = Application.Sheets(2)
* * Set shtMeas = Application.Sheets(3)
* * Set shtAlarm = Application.Sheets(4)
* * Set shtTrafo = Application.Sheets(5)
- * *Set shtBayLR = Application.Sheets(6)
* * Set shtStationLR = Application.Sheets(7)
* * Set shtLineInd = Application.Sheets(8)
* * Set shtGenerator = Application.Sheets(9)
* * Set shtAR = Application.Sheets(10)
* * Set shtTrip = Application.Sheets(11)

* * Set shtSymbols = Application.Sheets(12)
* * Set shtMappings = Application.Sheets(13)
* * Set shtDataSrc = Application.Sheets(14)
* * Set shtDefaults = Application.Sheets(15)
End Sub

First I thought that would be some regional settings problem but it doesn't
seem to be.

Thanks,