LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default issue when opening a workbook through a macro shortcut

Hi, I tried searching the group, but didn't find anything matching my
problem. It seems like something that would've been noticed before,
but maybe I'm just not using the right search terms. This isn't a
huge concern, but I'd like to know if I'm misunderstanding something
about how VBA works, as I'm pretty new to it. Thanks in advance!


I have a file (forms.xls) that I want to be able to open on a
keypress, so I've added a macro bound to Ctrl+Shift+F that just opens
forms.xls. This file is a series of data entry forms that I have to
print out, but not save (travel reimbursements, check requests,
etc.). Since I got tired of telling Excel that I don't want to save
changes, I added the following code to ThisWorkbook:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Saved = True
End Sub

While this works perfectly when I open the file normally, for some
reason the "Do you want to save changes?" box appears if I've opened
the file using Ctrl+Shift+F. Why is this, and is there any way to get
rid of it for this file?

Thanks again.

--DanC
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shortcut / Alt Key Issue [email protected] Excel Discussion (Misc queries) 1 October 2nd 07 04:27 PM
Opening a shortcut in a macro. nde Excel Programming 2 February 14th 07 09:17 PM
Excel Tempate Issue When Opening Existing Excel Workbook barry Setting up and Configuration of Excel 0 September 20th 06 04:35 PM
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet wyndman Excel Programming 2 May 25th 04 06:59 PM
Call macro from active workbook-duplicate shortcut keys James[_18_] Excel Programming 1 January 16th 04 05:53 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"