View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ymze ymze is offline
external usenet poster
 
Posts: 5
Default Macro does not work after the program has been restarted in excel.Run time error 2147417848 (80010108) Method visible of object_worksheet failed

Hi

The workbook is not protected...
The strange thing is that the macro work the second time you try in the
visual basic modul, without doing any changes.
this does not work in Excel, as excel freezes when you start the macro
in excel.

However I might think that another macro which is running when the
computer is started might interupt the other macro. I use this macro to
hide all sheets exept the frontpage where the login function is
located.
Can this macro play a part?

Sub Auto_open()
Application.Calculation = xlCalculationAutomatic
Sheets("Login").Visible = xlSheetVisible
Sheets("Northern Europe").Visible = xlSheetVeryHidden
Sheets("Central Europe").Visible = xlSheetVeryHidden
Sheets("Country Overview").Visible = xlSheetVeryHidden
Sheets("Sales Site").Visible = xlSheetVeryHidden
Sheets("Sales Port").Visible = xlSheetVeryHidden
Sheets("Logistics_Info").Visible = xlSheetVeryHidden
Sheets("Charts_Overview").Visible = xlSheetVeryHidden
Sheets("Port Sales").Visible = xlSheetVeryHidden
Sheets("Region Overview").Visible = xlSheetVeryHidden
Sheets("Chart per Site").Visible = xlSheetVeryHidden
Sheets("Southern Europe").Visible = xlSheetVeryHidden
Sheets("Area Overview").Visible = xlSheetVeryHidden
Sheets("Area per Country").Visible = xlSheetVeryHidden
Sheets("1").Visible = xlSheetVeryHidden
Sheets("Port Sales").Visible = xlSheetVeryHidden
Sheets("Sales Site Calc").Visible = xlSheetVeryHidden
Sheets("Site Sales").Visible = xlSheetVeryHidden
Sheets("Hierarchy Port").Visible = xlSheetVeryHidden
Sheets("hierarchy Acc").Visible = xlSheetVeryHidden
Sheets("Acc Sales").Visible = xlSheetVeryHidden
Sheets("Input Port Sales").Visible = xlSheetVeryHidden
Sheets("Input Acc Sales").Visible = xlSheetVeryHidden
Sheets("Input Costs").Visible = xlSheetVeryHidden
Sheets("Input Freight_Agent Costs").Visible = xlSheetVeryHidden
Sheets("Input inventory").Visible = xlSheetVeryHidden
Sheets("Input HR").Visible = xlSheetVeryHidden
Sheets("IDC").Visible = xlSheetVeryHidden
Sheets("Login").Select
MsgBox ("Welcome to the Port Report 2005, Login by typing the
Password for you Area, it is important that you it in Capitol letters,
if any errors contact Knut Espegren")
End Sub

Thank you again for your support!

Knut