Advertisement
Advertisement
| 11.16.2007 at 05:11AM PST, ID: 22965425 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: |
Sub delete_fault()
' this sub deletes a column in the OEE History Page when a fault is deleted from the userform. Only
' executes if there is data already written to the OEE History Sheet
Set OEEwkset = Worksheets("OEE History")
Set wksdata = Worksheets("DATA STORE")
'compare the new range aagainst current OEE History title range and delete entire columns from OEE HIstory that dont match.
If OEEwkset.Cells(1, 2).Value <> "" Then ' if data is recorded then..
Set CLL = OEEwkset.Rows(1).Find _
("DOWNTIME", OEEwkset.Cells(1, OEEwkset.Columns.Count), xlValues, xlWhole)
With OEEwkset
Set rng_history = .Range(.Cells(1, 2), .Cells(1, CLL.Column - 1))
End With
Set rng = Range("FAULT_RANGE")
For Each cel In rng_history.Cells
fndval = Application.Match(cel.Value, rng, 0)
If IsError(fndval) Then
If Not delrng Is Nothing Then
If Intersect(delrng, cel.EntireColumn) Is Nothing Then
Set delrng = Union(delrng, cel.EntireColumn)
End If
Else
Set delrng = cel.EntireColumn
End If
End If
Next cel
OEEwkset.Activate
If Not delrng Is Nothing Then
delrng.Select'<---------HITS ERROR HERE
delrng.EntireColumn.Delete
End If
End If
End Sub
|