Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a sub procedure that deletes data on a definited sheet in a definited
unnamed range(and only if background of the cell is yellow). I tried to write it but it doesn't work. When I call the sub procedure, visual basic says "syntax error" :( does anyone know why? Private Sub delete_data(sheet as string, ra, rb, column as integer) With Worksheets(sheet) For index = ra To rb If .Cells(index, column).Interior.ColorIndex = 6 Then .Cells(index, column) = "" End If Next index End With End Sub Private Sub cmdButton_Click() delete_data("shtHM",7,23,3) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I copy a range of data to another sheet? | Excel Worksheet Functions | |||
Extracting/deleting select data from range of cell | Excel Discussion (Misc queries) | |||
how to transfer data from sheet to sheet with new range? | Excel Discussion (Misc queries) | |||
Deleting cell data without deleting formula | Excel Discussion (Misc queries) | |||
Deleting Range name's listed in the range address box. | Excel Discussion (Misc queries) |