LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Closing Excel without saving

I've never used the .sendforreview.

Maybe someone who knows how that works will jump in with a tip for you.

But until they do, maybe you could just share the workbook yourself with a line
of code like:

ActiveWorkbook.SaveAs sPath & sFilename & ("_Studybank Application"), _
accessmode:=xlShared

Since it'll be already shared, the user shouldn't have to do anything (not
vigorously tested, though).

Abs wrote:

Hi Dave, it is me again.
I figured out the initial problem, just placing the displayalert code at the
right place, now saves my worksheet okay. However please look at the code
attached, after the Endif statement, when it tries to send for review, it
wants to save a shared version and I cannot make it pick option 'No'. I do
not want to create a shared version. If I deactivate the displayalert, the
code stops for an input from user on the Save As message box.
Sorry about this, but all this is arising from the fact my company uses
Lotus Notes as e-mail. I know Outlook does has this e-mail facility easier
than Lotus Notes.

Private Sub CommandButton1_Click()
Dim Response As String
Dim msg As String
Dim Style As String
Dim sPath As String
Dim sFilename As String
Dim ans

msg = "This workbook will close after saving; Are you sure to proceed?"
Style = vbYesNo + vbInformation + vbDefaultButton2

Response = MsgBox(msg, Style)
If Response = vbYes Then
sPath = "u:\"
sFilename = Range("b26").Value
ans = MsgBox("File will be saved as " & sPath & sFilename &
"_Studybank Application")
Application.Goto Reference:=Worksheets("Page1").Range("f2")
Selection.Value = sFilename & " application"
Application.Goto Reference:=Worksheets("Page1").Range("i2")
Selection.Formula = Now()
Application.Goto Reference:=Worksheets("Page1").Range("a1")
ActiveWorkbook.SaveAs sPath & sFilename & ("_Studybank Application")
Else
MsgBox ("Please save your application")
End If
Application.DisplayAlerts = False
ActiveWorkbook.SendForReview _
Recipients:="; ", _
Subject:=sFilename & "-Studybank Application.", _
ShowMessage:=True, _
IncludeAttachment:=True
ActiveWorkbook.Close savechanges:=False
Endsub


--

Dave Peterson


 
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Saving a Excel 97 file into Excel 2003 file Wil Excel Discussion (Misc queries) 1 December 13th 04 11:51 PM
Opening and saving Excel 2003 file from Excel 97. Rodrigo Excel Discussion (Misc queries) 2 December 12th 04 02:17 PM


All times are GMT +1. The time now is 05:10 AM.

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"