Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I Use winxp and excel2000.
I would like my workbook to always open with the sheet called "panel de control", so I have tried: Private Sub Workbook_Open() Sheets("panel de control").Select End Sub It opens with the sheet I was in when I saved the file last time, and then switches to the sheet "panel de control". To avoid seeing the sheet I was in when I saved last, I have tried: Private Sub Workbook_Open() Application.ScreenUpdating = False Sheets("panel de control").Select Application.ScreenUpdating = True End Sub That did not improve things. Any suggestions? Sincerely, Jan Nordgreen |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this, Jan (not private); works fine for me:
Sub workbook_open() Sheets("panel de control").Select End Sub <-*-<-*-<-*-<-*-<-*-<-*-<-*-<-*- Hope this helps! Anne Troy (better known as Dreamboat) Author: Dreamboat on Word Email: Dreamboat*at*Piersontech.com Web: www.TheOfficeExperts.com "Jan Nordgreen" wrote in message ... I Use winxp and excel2000. I would like my workbook to always open with the sheet called "panel de control", so I have tried: Private Sub Workbook_Open() Sheets("panel de control").Select End Sub It opens with the sheet I was in when I saved the file last time, and then switches to the sheet "panel de control". To avoid seeing the sheet I was in when I saved last, I have tried: Private Sub Workbook_Open() Application.ScreenUpdating = False Sheets("panel de control").Select Application.ScreenUpdating = True End Sub That did not improve things. Any suggestions? Sincerely, Jan Nordgreen |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I suggest you put the code into a Before_Close event instead. (Don'
forget to Save too) -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Sheets("panel de control").Select End Sub This will mean that the file is always saved with the required sheet selected and will therefore always open on that sheet. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the answers.
To put code in beforeclose does not help. When you open a workbook it will open on the sheet you were on when you last saved it, not when you last closed it. To put code in beforesave is not very practical. It would mean that you would change sheet every time you saved the workbook. I guess a way to go would be to manipulate the information Excel uses to determine which worksheet to open, but I don't know how. Regards, Jan Nordgreen |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
<<When you open a workbook it will
open on the sheet you were on when you last saved it That is why I suggested you add a line to save the file. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
open to a certain sheet tab in a different workbook | New Users to Excel | |||
Search open sheets in workbook and insert into open sheet | Excel Discussion (Misc queries) | |||
Open workbook on same sheet? | Excel Discussion (Misc queries) | |||
Open workbook at a particular sheet | New Users to Excel | |||
open sheet on workbook open | Excel Programming |