Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code, which will save a copy of the workbook as a given
name and the current date and time when a value of 1 is moved into a cell. The code seems to work as I expect it to. I would like to refine it to save a copy of certain sheets in the workbook instead of the entire workbook, and name and store the copy the same way it is in the existin code. This way the user opening the copies isn't promted to update external data. Can anyone Help? Thanks in advance... ****************** Private Sub Worksheet_Calculate() Dim Inrange As Range Dim rng As Range Set Inrange = Range("H1") For Each rng In Inrange.Cells If Not IsError(rng.Value) Then If Me.Range("H1").Value = "1" Then MsgBox "Saving a Dated Copy...." Application.EnableEvents = False ActiveWorkbook.SaveCopyAs Filename:="C:\Data\" & _ Replace(ActiveWorkbook.Name, ".xls", _ " " & Format(Now, "yyyy-mm-dd-hh-mm") & ".xls") Application.EnableEvents = True End If End If Next rng End Sub ***************** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Labels- POssible to show data value and data label together? | Charts and Charting in Excel | |||
Increase Your Business By Data Conversion, Data Format and Data EntryServices in India | Excel Worksheet Functions | |||
Save 20% On Data Conversion and Data Formats Services by Data EntryIndia | Excel Discussion (Misc queries) | |||
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing | Excel Discussion (Misc queries) | |||
Import Data / Edit Data / Export Data in Excel | Excel Programming |