Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Entire Column - Dave Peterson

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Entire Column - Dave Peterson

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Entire Column - Dave Peterson

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Entire Column - Dave Peterson

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Entire Column - Dave Peterson

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Entire Column - Dave Peterson

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
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
Question for Dave Peterson - Column Sorter Greg Glynn Excel Programming 7 June 4th 07 12:59 AM
Dave Peterson Rich_Patterson Excel Discussion (Misc queries) 2 January 26th 07 08:56 PM
Dave Peterson... jnf40 Excel Programming 9 September 9th 06 06:13 PM
to Dave Peterson Ross Excel Discussion (Misc queries) 2 September 18th 05 04:45 PM
thanks Dave Peterson steve Excel Programming 1 May 5th 04 03:58 AM


All times are GMT +1. The time now is 04:42 PM.

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

About Us

"It's about Microsoft Excel"