Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assistance needed with Macro Modification
Some of the workbooks that I use have anywhere between 5-15 spreadsheets, but
when its open only a few of those will actually be used or have any changes made in them. So... Is there a way to adjust the macro below so that it will only run in the spreadsheets that had changes made while the workbook was open? Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim wS As Worksheet Dim c As Range For Each wS In Worksheets For Each c In wS.UsedRange If Not c.HasFormula Then c.Value = Trim(c.Value) End If Next c Next wS ThisWorkbook.Save End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Paste Special Macro Assistance needed | Excel Programming | |||
Ron De Bruin Code modification needed when naming copied worksheet | Excel Programming | |||
Macro Compiles Sheets to One Book...Small Modification Needed | Excel Programming | |||
Macro assistance needed | Excel Programming | |||
Formula Modification Needed | Excel Programming |