Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This also works
Private Sub Workbook_Open() 'This is part of the macro in workbook VT Dim FileOpen, FileOpenend FileOpen = ActiveWorkbook.Path FileOpenend = FileOpen & "\Arkiv\" & "Statistikk.xls" Workbooks.Open FileOpenend Application.Windows("Statistikk.xls").Visible = False End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Michael" wrote in message ... Hi Bob. This is the code: Private Sub Workbook_Open() 'This is part of the macro in workbook VT Fileopen = ActiveWorkbook.Path Fileopenend = Fileopen & "\Arkiv\" & "Statistikk.xls" Workbooks.Open Fileopenend **Now the workbook Statistikk is open, but it will not take this Windows("Statistikk.xls").Visible = False End Sub -- Nil Satis Nisi Optimum "Bob Phillips" wrote: Michael, That seems to suggest then that you do not have a workbook called "Statistikk.xls" open in Excel. Is it spelt correctly? -- HTH RP (remove nothere from the email address if mailing direct) "Michael" wrote in message ... Hi again Bob. I forgot to tell you that i tried this one to. Windows("Statistikk.xls").Visible = False The message i get is "Run time error 9" "subscript out of range" -- Nil Satis Nisi Optimum "Bob Phillips" wrote: Almost Michael, when I say workbook name I mean with the extension Windows("Statistikk.xls").Visible = False -- HTH RP (remove nothere from the email address if mailing direct) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) | Excel Programming | |||
Replace application.RTD property by Application.RTDServers collect | Excel Programming | |||
macro to close excel application other than application.quit | Excel Programming | |||
Using Application.Run in VBA | Excel Programming | |||
application.quit will not shut off application | Excel Programming |