Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 2 Part question involving SaveAs and Auto Save when quit.

Here is the code I use to select Sheet3, make a copy of Sheet3, save Sheet3
as a new file and saved as the value in cell B15.

Sheets("Sheet3").Select
Sheets("Sheet3").Copy
ActiveWindow.ScrollRow = 1

ActiveWorkbook.SaveAs Filename:="\\Hci\HCI Share\C of A's - Building
4\00-RMHTest-6 ParametersXXXX\" & _
Range("B15").Value & ".xls"
ActiveWorkbook.Close

When I enter data in my workbook the value of B15 is unique for every new
entry.

How do I avoid accidently saving over a file previously created?

ex. I had entered "12345" into cell B15 and "hello" into cell B16 and ran
my macro. An hour later I wanted to enter new data and I entered "12345"
into cell B15 and "goodbye" into cell B16 and ran my macro.

This would leave me with a copy of Sheet3 saved as "12345" with "goodbye" in
B16 when I wanted "hello" in B16.

Second Part of question.

Each copy of Sheet3 that is saved as a new workbook and saved as the value
in cell B15 is locked and protected. I do not want anyone to be able to
modify this file but me. Whenever I open one of these files even though I
cant change anything, and nothing changes it still asks me if I want to save
or not. I cannot spend the time to go through each new file created and add
a macro to automatically close.

Is there a way to set it up in the code above so that the New file of Sheet3
never asks if you would like to save it?


Thank you for your help.
Ryan Hess
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
Excel 2007 question involving SaveAs to .XLS Kirk Bubul Excel Discussion (Misc queries) 3 October 17th 09 03:01 PM
Auto CAD help, involving hyperlinks coester Excel Discussion (Misc queries) 1 December 1st 06 06:27 PM
Application.Quit still wants to save phreud[_23_] Excel Programming 0 July 2nd 04 12:24 PM
VBA question involving an InputBox Don Lindros Excel Programming 1 April 13th 04 01:04 PM
VBA question involving an InputBox Don Lindros Excel Programming 3 April 12th 04 04:57 PM


All times are GMT +1. The time now is 06:50 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"