Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Opening .XLS In VBA: Getting "Do You Want To Save..." Prompt...

-----------------------------------------------------------------
Dim myExcel As Excel.Application

Set myExcel = CreateObject("Excel.Application")

myExcel.Workbooks.Open myPath, UpdateLinks:=False, ReadOnly:=True

..
..
.. (MS Access VBA scrapes data from various worksheets)
..
..

set myExcel = Nothing
----------------------------------------------------------------

But I keep getting a "Do you want to save changes...." prompt.

What am I missing?
--
PeteCresswell
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Opening .XLS In VBA: Getting "Do You Want To Save..." Prompt...


What am I missing?


Sorry for trashing the NG... I think I found the obvious:

2990 With mySS
2991 .Application.DisplayAlerts = False
2992 .Workbooks(1).Close
2993 .Quit
2994 .Application.DisplayAlerts = True
2999 End With
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Opening .XLS In VBA: Getting "Do You Want To Save..." Prompt...

Or

myss.workbooks(1).close savechanges:=false

And you shouldn't see the prompt.

PeteCresswell wrote:

What am I missing?


Sorry for trashing the NG... I think I found the obvious:

2990 With mySS
2991 .Application.DisplayAlerts = False
2992 .Workbooks(1).Close
2993 .Quit
2994 .Application.DisplayAlerts = True
2999 End With


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Opening .XLS In VBA: Getting "Do You Want To Save..." Prompt...

Per Dave Peterson:
Or

myss.workbooks(1).close savechanges:=false

And you shouldn't see the prompt.


Thanks... that cleaned up my code by a few lines.... and maybe
whoever looks at it will actually think I know what I'm doing....
-)
--
PeteCresswell
Reply
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
Bypass "Save PDF File As" Prompt via VBA in Excel [email protected] Excel Programming 0 November 29th 07 10:00 PM
is it possible to disable "save" prompt in excel file on web server? [email protected] Excel Discussion (Misc queries) 0 May 9th 07 05:58 PM
Disallow "SAVE" only "SAVE AS" or prompt DTTODGG Setting up and Configuration of Excel 6 December 21st 05 03:54 PM
The "i" prompt when opening a worksheet containing links Frank W Excel Programming 0 May 4th 04 08:26 PM
How can I get "File Close" to prompt me to "Save Changes" ?? Charles Jordan Excel Programming 4 July 31st 03 04:01 PM


All times are GMT +1. The time now is 02:09 PM.

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

About Us

"It's about Microsoft Excel"