Is there anyway i can get my spreadsheet to always open in a fesh version of excel even if i already have other books open?
Is there anyway i can get my spreadsheet to always open in a fesh version of excel even if i already have other books open?
I think the safest thing to do is start another instance of excel.
windows start button|run
excel
(hit enter)
then file|open that other workbook.
But by having multiple instances open, you'll find somethings won't work between
the two (copying formulas from one instance to another instance, for example).
ceemo wrote:
>
> Is there anyway i can get my spreadsheet to always open in a fesh
> version of excel even if i already have other books open?
>
> --
> ceemo
> ------------------------------------------------------------------------
> ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
> View this thread: http://www.excelforum.com/showthread...hreadid=396806
--
Dave Peterson
I was hoping to be able to do this using code. Perhaps a piece of code that on work book open checks to see how many books are open if more than one if then runs code to open it in a new excel application and close the current spreadsheet.
This might get you started--but I think it's a mistake!
Option Explicit
Sub testme()
Dim curWkbk As Workbook
Dim myFileName As Variant
Dim xlApp As Excel.Application
myFileName = Application.GetOpenFilename(filefilter:="Excel files, *.xls")
If myFileName = False Then
Exit Sub 'user hit cancel
End If
Set curWkbk = Nothing
On Error Resume Next
Set curWkbk = ActiveWorkbook
On Error GoTo 0
If curWkbk Is Nothing Then
Set xlApp = Application
Else
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
End If
xlApp.Workbooks.Open Filename:=myFileName
End Sub
Notice that in that new instance, none of your addins got loaded. (You'll have
to load them yourself.) And you'll have to make sure this code is available in
every instance of excel that you start--so you can reuse it.
I surely wouldn't do this.
ceemo wrote:
>
> I was hoping to be able to do this using code. Perhaps a piece of code
> that on work book open checks to see how many books are open if more
> than one if then runs code to open it in a new excel application and
> close the current spreadsheet.
>
> --
> ceemo
> ------------------------------------------------------------------------
> ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
> View this thread: http://www.excelforum.com/showthread...hreadid=396806
--
Dave Peterson
May be i should exlain why i want this there may be another way.
I am using the below to close all menu's when opening a workbook.
Private Sub Workbook_Open()
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = False
Next oCB
mFormulaBar = Application.DisplayFormulaBar
Application.DisplayFormulaBar = False
application.ignoreremoterequests=true
End Sub
the last line before end sub stops other work books being opened in the current excel app and opens a new app for them. However if excel is already open when i open this code the other workbooks are affected by the menu changes. This is what i dont want.
And you're opening the files by double clicking on them in windows explorer???
You could try:
Tools|options|General tab|Ignore other applications (check it)
Then double click on the workbook in windows explorer.
And be aware that turning this setting on sometimes gives errors with workbooks
that contain spaces in their path/name:
C:\my documents\excel\my book.xls
The error will look kind of like:
cannot find c:\my ..
then
cannot find documents\excel\my
then
cannot find book.xls
ceemo wrote:
>
> May be i should exlain why i want this there may be another way.
>
> I am using the below to close all menu's when opening a workbook.
>
> Private Sub Workbook_Open()
> Dim oCB As CommandBar
> For Each oCB In Application.CommandBars
> oCB.Enabled = False
> Next oCB
>
> mFormulaBar = Application.DisplayFormulaBar
> Application.DisplayFormulaBar = False
>
> application.ignoreremoterequests=true
>
> End Sub
>
> the last line before end sub stops other work books being opened in the
> current excel app and opens a new app for them. However if excel is
> already open when i open this code the other workbooks are affected by
> the menu changes. This is what i dont want.
>
> --
> ceemo
> ------------------------------------------------------------------------
> ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
> View this thread: http://www.excelforum.com/showthread...hreadid=396806
--
Dave Peterson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks