Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There it is again! Dave, in your reply to Darin, you used
.Range(.Columns(NextCol), .Columns(.Columns.Count)).EntireColumn.Delete I can find no difference between this and .Range(.Columns(NextCol), .Columns(.Columns.Count)).Delete I can see that under some coding circumstances, failing to include EntireColumn could cause a problem. But I wonder whether you include EntireColumn here as a fail-safe, or out of force of habit, or did I miss something? Thanks, James |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It's a personal choice--more than habit, less than required.
I find that reading: ..range(...).entirecolumn.something Documents itself better for me. I don't have to look at what's inside the ..range() portion to see that I want the entirecolumn. If I used activesheet.columns(1).delete I wouldn't have used .entirecolumn. Zone wrote: There it is again! Dave, in your reply to Darin, you used .Range(.Columns(NextCol), .Columns(.Columns.Count)).EntireColumn.Delete I can find no difference between this and .Range(.Columns(NextCol), .Columns(.Columns.Count)).Delete I can see that under some coding circumstances, failing to include EntireColumn could cause a problem. But I wonder whether you include EntireColumn here as a fail-safe, or out of force of habit, or did I miss something? Thanks, James -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I see exactly what you're saying. My main concern is not to give bad advice
in here. If I'm absolutely sure I'm working with columns (or rows), I'm not going to worry about including the Entire part. If I'm not 100% sure, I'll include it. And, of course, always including it does no harm and covers the odd unforeseen situation. As always, thank you for lending your expertise to the newsgroup. James "Dave Peterson" wrote in message ... It's a personal choice--more than habit, less than required. I find that reading: .range(...).entirecolumn.something Documents itself better for me. I don't have to look at what's inside the .range() portion to see that I want the entirecolumn. If I used activesheet.columns(1).delete I wouldn't have used .entirecolumn. Zone wrote: There it is again! Dave, in your reply to Darin, you used .Range(.Columns(NextCol), .Columns(.Columns.Count)).EntireColumn.Delete I can find no difference between this and .Range(.Columns(NextCol), .Columns(.Columns.Count)).Delete I can see that under some coding circumstances, failing to include EntireColumn could cause a problem. But I wonder whether you include EntireColumn here as a fail-safe, or out of force of habit, or did I miss something? Thanks, James -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oh, I wouldn't worry too much about giving wrong advice. There'll be enough
followups to set you straight <vbg. But if you're unsure, you can just state that in your message. I use "This worked for me" a lot! Sometimes, I'm not sure if my code does what the OP needed--sometimes, I'm not sure if my data was an accurate representation of the OP's data. Zone wrote: I see exactly what you're saying. My main concern is not to give bad advice in here. If I'm absolutely sure I'm working with columns (or rows), I'm not going to worry about including the Entire part. If I'm not 100% sure, I'll include it. And, of course, always including it does no harm and covers the odd unforeseen situation. As always, thank you for lending your expertise to the newsgroup. James "Dave Peterson" wrote in message ... It's a personal choice--more than habit, less than required. I find that reading: .range(...).entirecolumn.something Documents itself better for me. I don't have to look at what's inside the .range() portion to see that I want the entirecolumn. If I used activesheet.columns(1).delete I wouldn't have used .entirecolumn. Zone wrote: There it is again! Dave, in your reply to Darin, you used .Range(.Columns(NextCol), .Columns(.Columns.Count)).EntireColumn.Delete I can find no difference between this and .Range(.Columns(NextCol), .Columns(.Columns.Count)).Delete I can see that under some coding circumstances, failing to include EntireColumn could cause a problem. But I wonder whether you include EntireColumn here as a fail-safe, or out of force of habit, or did I miss something? Thanks, James -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi James, I am looking at the Range(.Columns(NextCol),
..Columns(.Columns.Count)) and thinking that might be either a single cell or a horizontal range in which case if the .EntireColumn property wasn't included, then only the portion called out by the Range reference would be deleted. I do not see the Range reference as being equivalent to the statement that includes .EntireColumn. "Zone" wrote: There it is again! Dave, in your reply to Darin, you used .Range(.Columns(NextCol), .Columns(.Columns.Count)).EntireColumn.Delete I can find no difference between this and .Range(.Columns(NextCol), .Columns(.Columns.Count)).Delete I can see that under some coding circumstances, failing to include EntireColumn could cause a problem. But I wonder whether you include EntireColumn here as a fail-safe, or out of force of habit, or did I miss something? Thanks, James |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Whiz,
Aha! I didn't think of that. It does get kinda squishy when considering the ramifications of range. So, it's better to include the "Entire" part as a matter of course. Gosh, I love this place! James "JLGWhiz" wrote in message ... Hi James, I am looking at the Range(.Columns(NextCol), .Columns(.Columns.Count)) and thinking that might be either a single cell or a horizontal range in which case if the .EntireColumn property wasn't included, then only the portion called out by the Range reference would be deleted. I do not see the Range reference as being equivalent to the statement that includes .EntireColumn. "Zone" wrote: There it is again! Dave, in your reply to Darin, you used .Range(.Columns(NextCol), .Columns(.Columns.Count)).EntireColumn.Delete I can find no difference between this and .Range(.Columns(NextCol), .Columns(.Columns.Count)).Delete I can see that under some coding circumstances, failing to include EntireColumn could cause a problem. But I wonder whether you include EntireColumn here as a fail-safe, or out of force of habit, or did I miss something? Thanks, James |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Question for Dave Peterson - Column Sorter | Excel Programming | |||
Dave Peterson | Excel Discussion (Misc queries) | |||
Dave Peterson... | Excel Programming | |||
to Dave Peterson | Excel Discussion (Misc queries) | |||
thanks Dave Peterson | Excel Programming |