Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert / Name / Define
I have a macro that should delete the contents of a named range, but it's not
deleting cell H17. In the Refers to box the range is defined as ='Sheet1'$H$10:$H$17. H10 through H16 deletes, but I have to manually delete H17. What goes here? Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert / Name / Define
Your code?
-- Kind regards, Niek Otten Microsoft MVP - Excel "Katherine R" wrote in message ... |I have a macro that should delete the contents of a named range, but it's not | deleting cell H17. In the Refers to box the range is defined as | ='Sheet1'$H$10:$H$17. H10 through H16 deletes, but I have to manually delete | H17. What goes here? | | Thanks. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert / Name / Define
"Katherine R" wrote...
I have a macro that should delete the contents of a named range, but it's not deleting cell H17. In the Refers to box the range is defined as ='Sheet1'$H$10:$H$17. H10 through H16 deletes, but I have to manually delete H17. What goes here? How is it really defined? The expression above is a syntax error since there's no ! between the worksheet name and the range address. You may believe it's defined to span H10:H17, but double check. Also, are you using .Clear or .ClearContents method calls? What's the actual macro statement you're using that doesn't work? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert / Name / Define
Sorry for the typo... ='Sheet 1'!$H$10:$H$17
It's doing as it should for all but cell H17 "Harlan Grove" wrote: "Katherine R" wrote... I have a macro that should delete the contents of a named range, but it's not deleting cell H17. In the Refers to box the range is defined as ='Sheet1'$H$10:$H$17. H10 through H16 deletes, but I have to manually delete H17. What goes here? How is it really defined? The expression above is a syntax error since there's no ! between the worksheet name and the range address. You may believe it's defined to span H10:H17, but double check. Also, are you using .Clear or .ClearContents method calls? What's the actual macro statement you're using that doesn't work? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert / Name / Define
"Katherine R" wrote...
Sorry for the typo... ='Sheet 1'!$H$10:$H$17 It's doing as it should for all but cell H17 .... OK, show the macro statement that isn't working. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert / Name / Define
Sub Clear_Click()
If ActiveSheet.ProtectContents Then ActiveSheet.Unprotect Range("Timedata").ClearContents Range("Timedata2").ClearContents Range("Afterhours").ClearContents Range("TimeComments").ClearContents Range("HolidayTaken").ClearContents ActiveSheet.Protect _ DrawingObjects:=True, _ Contents:=True Else Range("Timedata").ClearContents Range("Timedata2").ClearContents Range("Afterhours").ClearContents Range("TimeComments").ClearContents Range("HolidayTaken").ClearContents End If End Sub "Niek Otten" wrote: Your code? -- Kind regards, Niek Otten Microsoft MVP - Excel "Katherine R" wrote in message ... |I have a macro that should delete the contents of a named range, but it's not | deleting cell H17. In the Refers to box the range is defined as | ='Sheet1'$H$10:$H$17. H10 through H16 deletes, but I have to manually delete | H17. What goes here? | | Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Missing Define option from Insert/Name menu | Excel Discussion (Misc queries) | |||
naming cells using insert name define | Excel Worksheet Functions | |||
Insert-Name-Define limit ? | Excel Discussion (Misc queries) | |||
Insert menu...Define | Excel Worksheet Functions | |||
I can define a name, but I cannot use the name - menu Insert-Name-Use is blank | Excel Discussion (Misc queries) |