Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Define option from Insert/Name menu Roberts Excel Discussion (Misc queries) 2 July 4th 07 02:34 PM
naming cells using insert name define Educating Rita Excel Worksheet Functions 2 March 30th 07 09:12 PM
Insert-Name-Define limit ? Sunnyskies Excel Discussion (Misc queries) 12 December 6th 06 12:12 PM
Insert menu...Define FLKULCHAR Excel Worksheet Functions 4 October 20th 05 09:43 AM
I can define a name, but I cannot use the name - menu Insert-Name-Use is blank Zdenek Moravec Excel Discussion (Misc queries) 4 April 15th 05 02:55 PM


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"