Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 question involving SaveAs to .XLS | Excel Discussion (Misc queries) | |||
Auto CAD help, involving hyperlinks | Excel Discussion (Misc queries) | |||
Application.Quit still wants to save | Excel Programming | |||
VBA question involving an InputBox | Excel Programming | |||
VBA question involving an InputBox | Excel Programming |