Open workbook without running Workbook_Open Event

I'm using Excel 2007. How do I open a workbook (the workbook is a .xls 
97-2003 format) WITHOUT running the Workbook_Open event? I tried holding down 
the SHIFT key while opening as this worked in previous versions of Excel, but 
the event still runs (unfortunately, there is an ActiveWorkbook.Close at the 
end of my code so I can't get in to modify it :(

I'm sure there is a simple way to do this in 2007 but I do not know it. 
Thanks for the help.
0
Utf
5/12/2010 6:44:01 PM
excel.programming 6508 articles. 2 followers. Follow

5 Replies
2054 Views

Similar Articles

[PageSpeed] 12

Hi Domenick

I read more about this problem
Works OK for me when I use Office Button>Open and hold the Shift key

Change your security so you have the option to disable Macro's



-- 

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm



"Domenick" <Domenick@discussions.microsoft.com> wrote in message news:BC6B1847-2003-4D1E-A622-D1AC7F104E1B@microsoft.com...
> I'm using Excel 2007. How do I open a workbook (the workbook is a .xls 
> 97-2003 format) WITHOUT running the Workbook_Open event? I tried holding down 
> the SHIFT key while opening as this worked in previous versions of Excel, but 
> the event still runs (unfortunately, there is an ActiveWorkbook.Close at the 
> end of my code so I can't get in to modify it :(
> 
> I'm sure there is a simple way to do this in 2007 but I do not know it. 
> Thanks for the help. 
0
Ron
5/12/2010 6:50:22 PM
Disable Macros? If you automatically enable them then you'll have to
change the security level first. You can still edit vba and save. 



Domenick;722440 Wrote: 
> 
I'm using Excel 2007. How do I open a workbook (the workbook is a .xls
> 97-2003 format) WITHOUT running the Workbook_Open event? I tried
holding down
> the SHIFT key while opening as this worked in previous versions of
Excel, but
> the event still runs (unfortunately, there is an ActiveWorkbook.Close
at the
> end of my code so I can't get in to modify it :(
> 
> I'm sure there is a simple way to do this in 2007 but I do not know
it.
> Thanks for the help.


-- 
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?u=558
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=202323

http://www.thecodecage.com/forumz

0
p45cal
5/12/2010 6:53:26 PM
There are lots of times when I don't want events to "fire" besides just 
workbook open, so I've put a little sub in my personal.xlsb to toggle 
Application.EnableEvents between True and False, and assigned it to a custom 
button on my quick launch toolbar.  Then I just open Excel and click the 
custom button to disable events before opening a file where I don't want the 
Open event code to run.

"Domenick" wrote:

> I'm using Excel 2007. How do I open a workbook (the workbook is a .xls 
> 97-2003 format) WITHOUT running the Workbook_Open event? I tried holding down 
> the SHIFT key while opening as this worked in previous versions of Excel, but 
> the event still runs (unfortunately, there is an ActiveWorkbook.Close at the 
> end of my code so I can't get in to modify it :(
> 
> I'm sure there is a simple way to do this in 2007 but I do not know it. 
> Thanks for the help.
0
Utf
5/12/2010 7:37:01 PM
That's a good suggestion. Just curious: Does your custom button indicate 
whether the EnableEvents is ON or OFF (perhaps "pushed in" for ON)? If so, 
how did you do this? Thanks.

"B Lynn B" wrote:

> There are lots of times when I don't want events to "fire" besides just 
> workbook open, so I've put a little sub in my personal.xlsb to toggle 
> Application.EnableEvents between True and False, and assigned it to a custom 
> button on my quick launch toolbar.  Then I just open Excel and click the 
> custom button to disable events before opening a file where I don't want the 
> Open event code to run.
> 
> "Domenick" wrote:
> 
> > I'm using Excel 2007. How do I open a workbook (the workbook is a .xls 
> > 97-2003 format) WITHOUT running the Workbook_Open event? I tried holding down 
> > the SHIFT key while opening as this worked in previous versions of Excel, but 
> > the event still runs (unfortunately, there is an ActiveWorkbook.Close at the 
> > end of my code so I can't get in to modify it :(
> > 
> > I'm sure there is a simple way to do this in 2007 but I do not know it. 
> > Thanks for the help.
0
Utf
5/13/2010 2:27:01 PM
Private Sub CommandButton1_Click()
With Application
    If .EnableEvents = True Then
        .EnableEvents = False
        CommandButton1.Caption = "Disabled"
    Else
        .EnableEvents = True
        CommandButton1.Caption = "Enabled"
    End If
End With
End Sub


Gord Dibben  MS Excel MVP

On Thu, 13 May 2010 07:27:01 -0700, Domenick
<Domenick@discussions.microsoft.com> wrote:

>That's a good suggestion. Just curious: Does your custom button indicate 
>whether the EnableEvents is ON or OFF (perhaps "pushed in" for ON)? If so, 
>how did you do this? Thanks.
>
>"B Lynn B" wrote:
>
>> There are lots of times when I don't want events to "fire" besides just 
>> workbook open, so I've put a little sub in my personal.xlsb to toggle 
>> Application.EnableEvents between True and False, and assigned it to a custom 
>> button on my quick launch toolbar.  Then I just open Excel and click the 
>> custom button to disable events before opening a file where I don't want the 
>> Open event code to run.
>> 
>> "Domenick" wrote:
>> 
>> > I'm using Excel 2007. How do I open a workbook (the workbook is a .xls 
>> > 97-2003 format) WITHOUT running the Workbook_Open event? I tried holding down 
>> > the SHIFT key while opening as this worked in previous versions of Excel, but 
>> > the event still runs (unfortunately, there is an ActiveWorkbook.Close at the 
>> > end of my code so I can't get in to modify it :(
>> > 
>> > I'm sure there is a simple way to do this in 2007 but I do not know it. 
>> > Thanks for the help.

0
Gord
5/13/2010 2:53:42 PM
Reply:

Similar Artilces:

Exchange Event Scripts
Hi! We recently upgraded our Exchange Server from version 5.5 to version 2003. Before we did the update we had event scripts installed in several public folders. Those VB scripts reacted to some events e.g. when a new message was created in a folder (Folder_OnMessageCreated). Is that type of script supported by Exchange Server 2003? We want to install the scripts again on the new server but there is no more 'Agents' tab in the properties of a folder (Outlook). What do we have to do in order to have that tab again? Do we have to assign special permissions to an user account as in vers...

Need help running SQL formula to generate Price Per ounce
Hello I need a formula that would run as SQL Query to generate a Price per ounce and inset it in Sub Description field 1 in items Properties. The formula to calculate price per ounce is as fallows PPO=price/size Since most sizes are in ML we would have to convert ml to OZ ppo=price /(size filed / 29.57) I have entered size in Description field 2 Thanks for all the help Robert Robert wrote: > Hello > > I need a formula that would run as SQL Query to generate a Price per ounce > and inset it in Sub Description field 1 in items Properties. > > > The formula ...

Can we get notification of opening any site ??..
Hye, I am trying to get notification of any browser request... (not only that of the local server.. e.g. http://localhost/. so ISAPI filters will not be the right way to solve problem) So, whenever any request like (http://www.yahoo.com/) is made in IE, I want my DLL routine or my EXE to be called.. So, how to do that, any suggestion will be highly appreciated... Is there any registry entry that enables us to do that... If you know then please tell me... Or atleast tell me, is it possible or not so that I don't waste time on this... -- Jigar Mehta jbmehtain@yahoo.co...

how can I open *.php documents in Publisher or Works 8?
I now have a PC running WP Home edition, with Office 2003 Small Business edition. Works 8 was pre-installed on the PC. How can I open *.php documnents?? Publisher can save in this format but won't open the old documents in this format. You can't. The format .php is for Home Publishing, not Publisher. And I don't know what renegade version of Publisher you have but my copy of Publisher 2003 does not have the ability to save as a .php . -- JoAnn Paules MVP Microsoft [Publisher] "Steve Narbrough" <Steve Narbrough@discussions.microsoft.com> wrote in message...

Prevent Access To already open file
Hi, I am new to excell and this forum. Is there a way of preventing someone else opening an excel spreadsheet whilst it is being edited by someonelse even read only. Regards Dave:confused: -- ashtod1 ------------------------------------------------------------------------ ashtod1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30168 View this thread: http://www.excelforum.com/showthread.php?threadid=498523 ...

Shape.OnAction stops working after workbook closed and re-opened
I have created a set of icons which are made up of 3-4 individual shape objects grouped together. One of those objects needs to respond to a mouse click which I achieve using the OnAction setting, ie. shp.GroupItems(shp.Name).OnAction = "ShapeClick" where the shape and the group have the same name. Connector lines are used to join the icons up into a network. Unfortunately in XL2007 when connecting a line to the object the click event fires so to avoid this I first set OnAction to "" and then set it back to my macro after connections are made. Initially this w...

unable to open exchange system manager
I am running exchange 2k3 in a active/passive (win2k) cluster. After I changed the password of the domain administrator, I am unable to open ex2k3 system manager and also cluster administrator. It gives "access denied ID: c00700005" error. I also changed the permision in the registry for WINREG key in LOCAL MACHINE/Control/... etc, but that did not help. However I can open the cluster administrator from passive node. Active node is also not showing active directory objects (displays unspecified error message)when I try to assign NTFS permisions to some folders. When I run ...

Filename Split, then files not found, then original file opens...
The craziest thing has started happening. When I open a file excel splits my file (path and name) on spaces and tries to open individual files of the text strings created by the split. So if I open C:\Documents and Settings\User\Desktop\file.xls If will alert: \e.xls could not be found.... then it will alert C:\Documents.xls could not be found then it alerts and.xls could not be found then Settings\User\Desktop\file.xls could not be found Then it opens the file... Very weird, and very annoying. Does anybody know how to fix this? Thanks... -Marc --- Message posted from http://www...

unlock sheet or workbook
I try to see the formulas behind a cell.Since the sheet or workbook is protected I couldnt see it.This is the old file and I forgot the unprotect password.How can I unlock ??Thank you. Search for Excel Password in Google! John North Yorkshire UK "Onur Ekinci" <anonymous@discussions.microsoft.com> wrote in message news:2b4f01c4a797$95cf5630$a601280a@phx.gbl... >I try to see the formulas behind a cell.Since the sheet or > workbook is protected I couldnt see it.This is the old > file and I forgot the unprotect password.How can I > unlock ??Thank you. ...

how to open a pagemaker file with the extension .pmd , read only t
Hi, i'm using vc++6.0 MFC Application Wizard dialog based application and pagemaker 7.0... i need to open the pagemaker file with the extention .pmd using vc++ coding and i should read only the text from the file and i have to write the text in an excel sheet using vc++ coding.. can anyone help me to solve this problem....... ...

Permanent solution to event 9667 (Failed to create a new named property for database)??
Hi, I've been fighting the following problem for a few months now: Event Type: Error Event Source: MSExchangeIS Event Category: General Event ID: 9667 Date: 12/22/2009 Time: 03:14:58 User: N/A Computer: .... Description: Failed to create a new named property for database "First Storage Group\...." because the number of named properties reached the quota limit (8192). User attempting to create the named property: "SYSTEM" Named property GUID: 00020086-0000-0000-c000-00000000001b Named property name/id: "X-Vs" This article mentions...

Running check with VBA on multiple fields before updating
I'm trying to run a check on two fields so I can ascertain if the third field should be updated or if a new line should be added. I'm using the index and seek method to try and handle this. The problem is that the first match it comes across the field gets changed. This is my code. Dim db As Database Dim rec As Recordset Dim strSQL As String strSQL = "tblpos" Set db = CurrentDb() Set rec = db.OpenRecordset(strSQL) 'Do Until rec.EOF rec.Index = "emp" rec.Seek "=", Me!Combo257 If rec.NoMatch = False Then 'Do Unti...

OL2002 won't open when clicking on web links
I have WinXP home ed., Office XP small bus. ed., with outlook 2002. It was working fine but now when I click on a link on a web page I get a message saying "cannot open microsoft outlook. can't create item." I tried reinstalling officeXP and also went into file associations and made sure the URLmailto was associated with outlook. In IE 6.0 it does show outlook as being the default mail client. Email me if you can help! Thanks! ...

Linking Workbooks 02-11-10
I have a new problem that's come up after upgrading to Office 2007. I am linking my reporting workbook to the daily workbook that is updated by someone else. The cells I am linking to are merged cells. When I insert the link I get... ='[0203 Company 2.xls]Day'!$J$5:$J$6 which results in a #VALUE error unless I remove the last part of the formula (:$J$6). Any ideas on how to get around this? It's taking me twice as long to set up my links now. THANKS!!!! You cannot link to a range in that manner, only a single cell link is legal. =J5:J6 will always...

Running Totals
I have a table [tblFloor] 1100 different products [Product] with ship dates [SDate] and cases shipped [Cases] for about a year; this table has about 760, 000 records. I need to have a running total for each of the products that total shipments [Cases] for 5 days incrementing 1 day at a time. Then need the max total for each particular product for the 5 day sub total. [tblFloor] [ID] [Product] [SDate] [Cases] -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200707/1 ...

SQL Error when running Paid Trx Removal
When running Paid Trx Removal, we get the following error: Microsoft ODBCSQLServerDriver Cannon insert duplicate key row in object RM30101 with unique index AK4RM30101. Then another error: The stored procedue RMPaidTransRemoval returned the following results DBMS 2601, Great Plains: 0. I ran check links and that didn't fix it. What can I do? Is there a query that I need to run to delete this dup. key? Any help would be great, this removal/report needs to be run asap. Thank you. Beth Beth, The problem here is that the RM30101 has duplicate key for one your transactions. If you kn...

How to stop Personal.xls opening at startup
Hi, Somehow I've got this file starting automatically when I open Excel 2003. How can I make it stop? And what does it do? I hope I don't need it. Thanks, Michele Personal.xls is the default name of the workbook that XL creates in the XLStart folder when you store a macro. It's just a workbook, but since it lives in XLStart, it's opened each time XL is opened. To "make it stop", move or delete the file. In article <1116965055.499496.41970@o13g2000cwo.googlegroups.com>, michele@quality-computing.com wrote: > Somehow I've got this file start...

Open/Partial/Closed PO icons gone
One of the computers here had a problem with Windows and I had to blow it away and re-install everything. I installed RMS v2.0 Store Ops & HQ and applied the Hot Fix we're all running (v2.0.0109, I think). The PO list used to have icons for Status. White/Blank for Open, White w/Red Exclamation Point for Partial and Yellow w/Lines for Closed. On this one PC, these icons have been replaced with text. It's obviously not a critical issue, but the user of this PC has been looking at those icons for over two years and she would prefer the icons over the text. Problem also appl...

Have a Macro run after updating cells
How do I set up a macro so that it runs each time I update a cell in my spread sheet (that is after I click enter). Thanks, Scott http://www.mrexcel.com/tip006.shtml "sip8316" wrote: > How do I set up a macro so that it runs each time I update a cell in my > spread sheet (that is after I click enter). > > Thanks, > > Scott ...

Help linking workbooks
I have 5 direct reports who have 5 of their own. I created a spreadsheet to give to the 30 indirect reports and now I want to be able to gather the data for each of my direct reports. I know I can have my direct report's spreadsheet link to their reports but I don't want to create the templete 5 times and then redo it every time a direct or indirect report changes or one is added. Is there a way to link spreadsheets but instead of giving a definate workbook name have it reference a cell within that workbook which would tell it the name of the workbook to reference? IE. We a...

Snap In Failed
We entered our license key and added the license to user. While inside the CRM after adding licenses we were logged off and when we retry it comes up "User Access Error", we rebooted the server and it still won't let us on. When we try going into the deployment manager, we have lost functionality. Is the MSCRM Security Service started? If not, try manually starting it in Administrative Tools | Services. -- Bullitt Fitzhugh Integrated Business Systems www.ib-systems.com "NSMeritel" wrote: > We entered our license key and added the license to user. While...

Open Gp
Hello all, just did the upgrade to GP 8 and everything went fine.. However when I uninstalled GP 7.5 the Icon for 8 went with it. I tried to drag the dynamics.set file ontop on the dynamics exe file for the association and that worked however i have to do that the entire time.. I checked the properties of the shortcut and they point to the appropriate directory but each time I have to "open launch file" from the dexterity Runtime.. can't find anything on customer source as of yet.. Many thanx Are you talking about the desktop icon? If so you need click on my computer expand ...

Outlook.pst file is 2Gb and cannot be opened
I tried to open outlook this morning and was unable to. The error box said something like ... The file outlook.pst has reached it's maximum size and cannot be opened, please delete unnecessary items permanently (Shift + del) The only problem is I cannot open outlook.pst to delete any items. The size of the file is 2Gb - and I'm sure that last time (a week or so ago) I looked at the file is was 85Mb Any suggestions? TIA Daniel Well, either you have a lot of girlfriends or then just a sh!t load of spam... Goodluck on that one, my pst is around 900mbs.. >-----Original...

.xls trailing on end of name for workbook
Hi everybody, On one computer I can save an excel file that would show for example "Book1", Then on another computer if I try to save a file it saves it as "Book1.xls", I notice that all the files have this xls attachment on the end on one computer but not on the other. Why is it doing this and can it be corrected. The only way I can rename a file on this computer is by leaving the .xls there? Thanks for any help Larry -- keithl816 ------------------------------------------------------------------------ keithl816's Profile: http://www.excelforum.com/member.php?ac...

Outlook 2003 opens very slowly pls help
Hi I am running Outlook 2003 on Exchange Server and I notice when I have an email with an attachment it takes a long time to open. Does anyone know why this is happening and how to correct the problem? Thanks. ...